From bc873d38b8ac34a0795fdc487fab5d69be7e160f Mon Sep 17 00:00:00 2001 From: GODrums Date: Sat, 7 Dec 2024 00:41:15 +0100 Subject: [PATCH] chore: formatting --- webapp/src/app/app.config.ts | 10 +++++----- .../app/core/sentry/sentry.error-handler.ts | 18 +++++++++--------- .../leaderboard/filter/filter.component.ts | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/webapp/src/app/app.config.ts b/webapp/src/app/app.config.ts index 57405d10..3da5f04e 100644 --- a/webapp/src/app/app.config.ts +++ b/webapp/src/app/app.config.ts @@ -29,10 +29,10 @@ export const appConfig: ApplicationConfig = { { provide: ErrorHandler, useClass: SentryErrorHandler }, { provide: TraceService, deps: [Router] }, { - provide: APP_INITIALIZER, - useFactory: () => () => {}, - deps: [TraceService], - multi: true, - }, + provide: APP_INITIALIZER, + useFactory: () => () => {}, + deps: [TraceService], + multi: true + } ] }; diff --git a/webapp/src/app/core/sentry/sentry.error-handler.ts b/webapp/src/app/core/sentry/sentry.error-handler.ts index 4d0a1b11..06cb11fd 100644 --- a/webapp/src/app/core/sentry/sentry.error-handler.ts +++ b/webapp/src/app/core/sentry/sentry.error-handler.ts @@ -1,6 +1,6 @@ import { ErrorHandler, Injectable } from '@angular/core'; import { environment } from 'environments/environment'; -import * as Sentry from "@sentry/angular"; +import * as Sentry from '@sentry/angular'; @Injectable({ providedIn: 'root' }) export class SentryErrorHandler extends ErrorHandler { @@ -35,14 +35,14 @@ export class SentryErrorHandler extends ErrorHandler { * @param error */ override handleError(error: any): void { - if (error && error.name === 'HttpErrorResponse' && error.status < 500 && error.status >= 400) { - super.handleError(error); - return; - } - if (this.environment.sentry.environment !== 'local') { - const exception = error.error || error.message || error.originalError || error; - Sentry.captureException(exception); - } + if (error && error.name === 'HttpErrorResponse' && error.status < 500 && error.status >= 400) { super.handleError(error); + return; + } + if (this.environment.sentry.environment !== 'local') { + const exception = error.error || error.message || error.originalError || error; + Sentry.captureException(exception); + } + super.handleError(error); } } diff --git a/webapp/src/app/home/leaderboard/filter/filter.component.ts b/webapp/src/app/home/leaderboard/filter/filter.component.ts index fd2dde3c..9592c6bb 100644 --- a/webapp/src/app/home/leaderboard/filter/filter.component.ts +++ b/webapp/src/app/home/leaderboard/filter/filter.component.ts @@ -16,6 +16,6 @@ export class LeaderboardFilterComponent { teams = input(); throwTestError() { - throw new Error("Sentry Test Error2"); + throw new Error('Sentry Test Error2'); } }