Better handling of file uploads

This commit is contained in:
Dane Everitt 2020-08-22 22:35:53 -07:00
parent f561089cad
commit b4c64d3dc0
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 32 additions and 34 deletions

View file

@ -66,6 +66,11 @@ export function httpErrorToHuman (error: any): string {
if (data.errors && data.errors[0] && data.errors[0].detail) {
return data.errors[0].detail;
}
// Errors from wings directory, mostly just for file uploads.
if (data.error && typeof data.error === 'string') {
return data.error;
}
}
return error.message;