[ACA] Upload - 500 error message (#419)

* 500 error message

* generic error message
This commit is contained in:
Cilibiu Bogdan 2018-06-15 14:18:30 +03:00 committed by Denys Vuika
parent 13bfd118d6
commit be8edcc9d6
2 changed files with 16 additions and 8 deletions

View File

@ -191,12 +191,18 @@ export abstract class PageComponent implements OnInit, OnDestroy {
}
onFileUploadedError(error: FileUploadErrorEvent) {
let message = null;
let message = 'APP.MESSAGES.UPLOAD.ERROR.GENERIC';
if (error.error.status === 409) {
message = new SnackbarErrorAction('VERSION.MESSAGE.ERROR.CONFLICT');
message = 'APP.MESSAGES.UPLOAD.ERROR.CONFLICT';
}
this.store.dispatch(message);
if (error.error.status === 500) {
message = 'APP.MESSAGES.UPLOAD.ERROR.500';
}
const action = new SnackbarErrorAction(message);
this.store.dispatch(action);
}
}

View File

@ -174,6 +174,13 @@
}
}
},
"UPLOAD": {
"ERROR": {
"GENERIC": "Opps! There was a problem",
"CONFLICT": "New version not uploaded, another file with the same name already exists",
"500": "Opps! There was a problem while uploading"
}
},
"INFO": {
"TRASH": {
"NODES_PURGE": {
@ -231,11 +238,6 @@
"SEARCH": "Search"
},
"VERSION": {
"MESSAGE": {
"ERROR": {
"CONFLICT": "New version not uploaded, another file with the same name already exists"
}
},
"DIALOG": {
"TITLE": "Manage Versions",
"CLOSE": "Close"