feat: introduce Sentry
This commit is contained in:
@@ -2,6 +2,7 @@ import { IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default class BaseError extends Error {
|
||||
details = {};
|
||||
statusCode?: number;
|
||||
|
||||
constructor(error?: string | IJSONObject) {
|
||||
let computedError: Record<string, unknown>;
|
||||
|
9
packages/backend/src/errors/quote-exceeded.ts
Normal file
9
packages/backend/src/errors/quote-exceeded.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import BaseError from './base';
|
||||
|
||||
export default class QuotaExceededError extends BaseError {
|
||||
constructor(error = 'The allowed task quota has been exhausted!') {
|
||||
super(error);
|
||||
|
||||
this.statusCode = 422;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user