From 13fb4de93befee792772284ffa70a952dc407148 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 29 Jan 2018 16:15:39 +0100 Subject: [PATCH] Add message on 413 http error code --- client/src/app/shared/rest/rest-extractor.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/app/shared/rest/rest-extractor.service.ts b/client/src/app/shared/rest/rest-extractor.service.ts index 59dea7880..1b475da89 100644 --- a/client/src/app/shared/rest/rest-extractor.service.ts +++ b/client/src/app/shared/rest/rest-extractor.service.ts @@ -59,7 +59,10 @@ export class RestExtractor { } else if (err.error.error) { errorMessage = err.error.error } + } else if (err.status === 413) { + errorMessage = 'Request is too large for the server. Please contact you administrator if you want to increase the limit size.' } + errorMessage = errorMessage ? errorMessage : 'Unknown error.' console.error(`Backend returned code ${err.status}, body was: ${errorMessage}`) } else { -- 2.25.1