* feat: wip add user to sentry * feat: wip interceptor * feat: wip add user to sentry * feat: add user into sentry errors * fix: hide stack trace in production * fix: properly log commands and handle exceptions * fix: filter command exceptions * feat: handle jobs errors
28 lines
870 B
TypeScript
28 lines
870 B
TypeScript
import { ExceptionHandlerUser } from 'src/integrations/exception-handler/interfaces/exception-handler-user.interface';
|
|
import { ExceptionHandlerOptions } from 'src/integrations/exception-handler/interfaces/exception-handler-options.interface';
|
|
|
|
import { ExceptionHandlerDriverInterface } from 'src/integrations/exception-handler/interfaces';
|
|
|
|
export class ExceptionHandlerConsoleDriver
|
|
implements ExceptionHandlerDriverInterface
|
|
{
|
|
captureExceptions(
|
|
exceptions: ReadonlyArray<any>,
|
|
options?: ExceptionHandlerOptions,
|
|
) {
|
|
console.group('Exception Captured');
|
|
console.info(options);
|
|
console.error(exceptions);
|
|
console.groupEnd();
|
|
|
|
return [];
|
|
}
|
|
|
|
captureMessage(message: string, user?: ExceptionHandlerUser): void {
|
|
console.group('Message Captured');
|
|
console.info(user);
|
|
console.info(message);
|
|
console.groupEnd();
|
|
}
|
|
}
|