[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);
}
}