Add exceptions for metadata modules (#6070)
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
This commit is contained in:
8
packages/twenty-server/src/utils/custom-exception.ts
Normal file
8
packages/twenty-server/src/utils/custom-exception.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export class CustomException extends Error {
|
||||
code: string;
|
||||
|
||||
constructor(message: string, code: string) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user