add tests, move CustomError to common, fix casting

This commit is contained in:
Matteo Pagliazzi
2016-03-03 00:16:28 +01:00
parent 05b6e25c28
commit 80f791c86b
11 changed files with 260 additions and 42 deletions

View File

@@ -0,0 +1,9 @@
import CustomError from './customError';
export class NotAuthorized extends CustomError {
constructor (customMessage) {
super();
this.name = this.constructor.name;
this.message = customMessage || 'Not authorized.';
}
}