Fix custom exceptions not propagating error code (#10210)
## Context In some CustomException exceptions, we were instantiating a code without initializing it which was overriding the parent code and it was then lost when retrieving it in filters. Removing them to make sure we don't reproduce this pattern
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class BillingException extends CustomException {
|
||||
code: BillingExceptionCode;
|
||||
constructor(message: string, code: BillingExceptionCode) {
|
||||
super(message, code);
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class FeatureFlagException extends CustomException {
|
||||
code: FeatureFlagExceptionCode;
|
||||
constructor(message: string, code: FeatureFlagExceptionCode) {
|
||||
super(message, code);
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class FileStorageException extends CustomException {
|
||||
code: FileStorageExceptionCode;
|
||||
constructor(message: string, code: FileStorageExceptionCode) {
|
||||
super(message, code);
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ export enum FileExceptionCode {
|
||||
}
|
||||
|
||||
export class FileException extends CustomException {
|
||||
code: FileExceptionCode;
|
||||
constructor(message: string, code: FileExceptionCode) {
|
||||
super(message, code);
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class SSOException extends CustomException {
|
||||
code: SSOExceptionCode;
|
||||
constructor(message: string, code: SSOExceptionCode) {
|
||||
super(message, code);
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class ThrottlerException extends CustomException {
|
||||
code: ThrottlerExceptionCode;
|
||||
constructor(message: string, code: ThrottlerExceptionCode) {
|
||||
super(message, code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user