Class exception for each metadata module + handler to map on graphql error TODO left : - find a way to call handler on auto-resolvers nestjs query (probably interceptors) - discuss what should be done for pre-hooks errors - discuss what should be done for Unauthorized exception
9 lines
157 B
TypeScript
9 lines
157 B
TypeScript
export class CustomException extends Error {
|
|
code: string;
|
|
|
|
constructor(message: string, code: string) {
|
|
super(message);
|
|
this.code = code;
|
|
}
|
|
}
|