Skip to content

Instantly share code, notes, and snippets.

@rimiti
Created October 1, 2019 15:39
Show Gist options
  • Save rimiti/051121136261c54cd495ca4ab7449ebb to your computer and use it in GitHub Desktop.
Save rimiti/051121136261c54cd495ca4ab7449ebb to your computer and use it in GitHub Desktop.
Javascript: Creating a custom javascript error
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