Better errors handling (#8835)
- [ ] Catch this specific `500` error - [ ] Make sure catched `500` errors are sent to sentry for the Cloud version - [ ] Hide the option to sync email with google in this situation where the according env var is missing - [x] Add Worskpace information to all catched errors for better debugging fix #8607
This commit is contained in:
@ -0,0 +1,12 @@
|
||||
import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class EnvironmentException extends CustomException {
|
||||
code: EnvironmentExceptionCode;
|
||||
constructor(message: string, code: EnvironmentExceptionCode) {
|
||||
super(message, code);
|
||||
}
|
||||
}
|
||||
|
||||
export enum EnvironmentExceptionCode {
|
||||
ENVIRONMENT_VARIABLES_NOT_FOUND = 'ENVIRONMENT_VARIABLES_NOT_FOUND',
|
||||
}
|
||||
Reference in New Issue
Block a user