From 7be14a3436e79b2d2f9ea8bdb5ab272869061bcc Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 25 Mar 2020 10:27:07 +0100 Subject: [PATCH] MOBILE-3269 core: Fix error displayed when capturing media --- src/core/fileuploader/providers/helper.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/fileuploader/providers/helper.ts b/src/core/fileuploader/providers/helper.ts index fb1ac27a0..afaa6f909 100644 --- a/src/core/fileuploader/providers/helper.ts +++ b/src/core/fileuploader/providers/helper.ts @@ -399,7 +399,10 @@ export class CoreFileUploaderHelperProvider { // Error, not cancelled. this.logger.error('Error while recording audio/video', error); - return Promise.reject(this.translate.instant(defaultMessage)); + const message = error.code == 20 ? this.translate.instant('core.fileuploader.errornoapp') : + (error.message || this.translate.instant(defaultMessage)); + + return Promise.reject(message); } else { this.logger.debug('Cancelled'); }