mirror of
https://github.com/danbulant/ester_os
synced 2026-07-05 19:11:03 +00:00
Add invalildUsername and invalidUUID errors
This commit is contained in:
parent
255a250869
commit
751b1df280
3 changed files with 22 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
//Re-exporting for simpler importing
|
//Re-exporting for simpler importing
|
||||||
|
|
||||||
import NotYetImplementedError from './notYetImplemented';
|
import NotYetImplemented from './notYetImplemented';
|
||||||
|
import InvalidUsername from './invalidUserName';
|
||||||
|
import InvalidUUID from './invalidUUID';
|
||||||
|
|
||||||
export default {
|
export {NotYetImplemented, InvalidUsername, InvalidUUID};
|
||||||
NotYetImplementedError
|
|
||||||
};
|
|
||||||
9
client/src/errors/invalidUUID.ts
Normal file
9
client/src/errors/invalidUUID.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import Error from './error';
|
||||||
|
|
||||||
|
export default class InvalidUUID extends Error {
|
||||||
|
name = "InvalidUUID";
|
||||||
|
constructor() {
|
||||||
|
super("Invalid UUID format");
|
||||||
|
this.stack = (<any>new Error("Invalid UUID format")).stack;
|
||||||
|
}
|
||||||
|
}
|
||||||
9
client/src/errors/invalidUsername.ts
Normal file
9
client/src/errors/invalidUsername.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import Error from './error';
|
||||||
|
|
||||||
|
export default class InvalidUsername extends Error {
|
||||||
|
name = "InvalidUsername";
|
||||||
|
constructor() {
|
||||||
|
super("Invalid username provided");
|
||||||
|
this.stack = (<any>new Error("Invalid username provided")).stack;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue