From 3f01c07f072d03cdc278527293ae9bbb80d253b8 Mon Sep 17 00:00:00 2001 From: Ashwin Thanaraj <37061471+ashwin1111@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:04:24 +0530 Subject: [PATCH] QBD logo update (#898) * QBD logo update * fix img --- src/app/core/services/common/api.service.ts | 18 +- .../landing/landing.component.html | 2 +- .../qbd-dashboard.component.html | 2 +- .../qbd-landing.component.html | 2 +- src/assets/flow-charts/qbd-flow-chart.svg | 177 ++---------------- src/main.ts | 2 - 6 files changed, 37 insertions(+), 166 deletions(-) diff --git a/src/app/core/services/common/api.service.ts b/src/app/core/services/common/api.service.ts index 58e2ed608..758da1093 100644 --- a/src/app/core/services/common/api.service.ts +++ b/src/app/core/services/common/api.service.ts @@ -28,10 +28,20 @@ export class ApiService { private handleError(error: HttpErrorResponse, httpMethod: string, url: string) { if (error.error instanceof ErrorEvent) { console.error('An error occurred:', error.error.message); - } else if (error.status >= 500) { - console.error( - `Backend returned code ${error.status}, url was: ${url} method was: ${httpMethod}, body was: ${JSON.stringify(error.error)}` - ); + } else { + // Raise error only for non GET requests and 5xx errors (incase of GET) + let raiseError: boolean = false; + if (httpMethod !== 'GET') { + raiseError = true; + } else if (error.status >= 500) { + raiseError = true; + } + + if (raiseError) { + console.error( + `Backend returned code ${error.status}, url was: ${url} method was: ${httpMethod}, body was: ${JSON.stringify(error.error)}` + ); + } } return throwError(error); } diff --git a/src/app/integrations/landing/landing.component.html b/src/app/integrations/landing/landing.component.html index 6b3bab8c5..061bb6a5a 100644 --- a/src/app/integrations/landing/landing.component.html +++ b/src/app/integrations/landing/landing.component.html @@ -41,7 +41,7 @@