diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index 7e382a2f6..497fdc427 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -232,6 +232,7 @@ export class AuthService { window['e'] = e console.error('BeforesendAtachment', e) message.uploadingFile = false + this.httpErroHandle.httpStatusHandleUploadFile(e); return false } @@ -252,6 +253,7 @@ export class AuthService { window['e'] = e console.error('BeforesendAtachment', e) message.uploadingFile = false + this.httpErroHandle.httpStatusHandleUploadFile(e); return false } } diff --git a/src/app/services/http-error-handle.service.ts b/src/app/services/http-error-handle.service.ts index 49b039f1a..d7eb38160 100644 --- a/src/app/services/http-error-handle.service.ts +++ b/src/app/services/http-error-handle.service.ts @@ -50,13 +50,24 @@ export class HttpErrorHandle { } } + async httpStatusHandleUploadFile(error) { + switch (error.status + ) { + case 403: + this.toastService._badRequest('O ficheiro que .') + break; + default: + break; + } + } + async loginHttpStatusHandle(error) { switch (error.status ) { case 0: const result = await this.backgroundService.offline() if (result) { - this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão') + this.toastService._badRequest('O ficheiro que tentou enviar contém possível script malicioso') } else { }