Created
October 1, 2019 15:39
-
-
Save rimiti/051121136261c54cd495ca4ab7449ebb to your computer and use it in GitHub Desktop.
Javascript: Creating a custom javascript error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class RequestError extends Error { | |
constructor(message, meta = {}) { | |
super(); | |
this.message = message; | |
this.meta = meta; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment