Add message on 413 http error code

pull/267/head
Chocobozzz 2018-01-29 16:15:39 +01:00
parent ba12e8b3a6
commit 13fb4de93b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 0 deletions

View File

@ -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 {