feat: introduce Sentry

This commit is contained in:
Ali BARIN
2023-03-10 18:53:10 +00:00
parent 2c18667ffd
commit 4d90df9d9a
19 changed files with 197 additions and 13 deletions

View File

@@ -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>;

View 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;
}
}