[KON-675] Error Message when disconnected from network
diff --git a/i18n/general.de.json b/i18n/general.de.json index 582671f..f2b8372 100644 --- a/i18n/general.de.json +++ b/i18n/general.de.json
@@ -4,6 +4,7 @@ "ServerError404": "Nicht gefunden. Bitte kontaktieren Sie den Administrator.", "ServerError409": "Die Aktion kann nicht durchgeführt werden, weil eine Abhängigkeit zu einem anderen Datensatz existiert.", "ServerError500": "Ein Fehler ist aufgetreten. Bitte kontaktieren Sie den Administrator.", + "ServerError504": "Beim Warten auf ein Gateway ist ein Timeout aufgetreten. Bitte prüfen Sie Ihre Netzwerkverbindung oder kontaktieren Sie den Administrator.", "SuccessNotificationTitle": "Erfolg", "ErrorNotificationTitle": "Fehler", "InfoNotificationTitle": "Info",
diff --git a/src/app/shared/asyncServices/http/httpResponseHandler.service.ts b/src/app/shared/asyncServices/http/httpResponseHandler.service.ts index eb5da94..8af4088 100644 --- a/src/app/shared/asyncServices/http/httpResponseHandler.service.ts +++ b/src/app/shared/asyncServices/http/httpResponseHandler.service.ts
@@ -59,6 +59,9 @@ this.handleServerError(); break; + case 504: + this.handleServerTimeoutError(); + break; default: break; } @@ -160,7 +163,12 @@ } } } + private handleServerTimeoutError(): void { + const message = this.translateService.instant('ServerError504'), + title = this.translateService.instant('ErrorNotificationTitle'); + this.showNotificationError(title, message); + } /** * Extracts and returns translated value from server response *