mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-1057] Upload - snack-bar error messages (#837)
* upload error notification * remove duplicate * test
This commit is contained in:
committed by
Denys Vuika
parent
9b717c2743
commit
4c77ace5eb
@@ -167,6 +167,14 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
onFileUploadedError(error: FileUploadErrorEvent) {
|
||||
let message = 'APP.MESSAGES.UPLOAD.ERROR.GENERIC';
|
||||
|
||||
if (error.error.status === 403) {
|
||||
message = 'APP.MESSAGES.UPLOAD.ERROR.403';
|
||||
}
|
||||
|
||||
if (error.error.status === 404) {
|
||||
message = 'APP.MESSAGES.UPLOAD.ERROR.404';
|
||||
}
|
||||
|
||||
if (error.error.status === 409) {
|
||||
message = 'APP.MESSAGES.UPLOAD.ERROR.CONFLICT';
|
||||
}
|
||||
@@ -175,6 +183,10 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
message = 'APP.MESSAGES.UPLOAD.ERROR.500';
|
||||
}
|
||||
|
||||
if (error.error.status === 504) {
|
||||
message = 'APP.MESSAGES.UPLOAD.ERROR.504';
|
||||
}
|
||||
|
||||
this.store.dispatch(new SnackbarErrorAction(message));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user