@momentumsolar/errors
v1.3.0
Published
## Installation
Downloads
7
Readme
@momentumsolar/errors
Installation
npm i @momentumsolar/errors
Usage
import { MTSError, BadRequest } from '@momentumsolar/errors';
or
const { MTSError, BadRequest } = require('@momentumsolar/errors');
try {
throw new BadRequest('My error message');
} catch(e) {
if (e instanceof MTSError) {
const errorData = e.serializeError();
}
}