From 0139cd9cf6c932db8d076cd05a9b4c43c1586ddb Mon Sep 17 00:00:00 2001 From: Jeremy Press Date: Thu, 21 Mar 2019 16:07:15 -0700 Subject: [PATCH] Chore: PR feedback --- src/lib/viewers/doc/DocBaseViewer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/viewers/doc/DocBaseViewer.js b/src/lib/viewers/doc/DocBaseViewer.js index 92c22d5ca..ca54ceb38 100644 --- a/src/lib/viewers/doc/DocBaseViewer.js +++ b/src/lib/viewers/doc/DocBaseViewer.js @@ -663,7 +663,7 @@ class DocBaseViewer extends BaseViewer { console.error(err); // pdf.js gives us the status code in their error message - const { status } = err; + const { status, message } = err; // Display a generic error message but log the real one const error = @@ -672,9 +672,9 @@ class DocBaseViewer extends BaseViewer { ERROR_CODE.DELETED_REPS, __('error_refresh'), { isRepDeleted: true }, - err.message + message ) - : new PreviewError(ERROR_CODE.CONTENT_DOWNLOAD, __('error_document'), err.message); + : new PreviewError(ERROR_CODE.CONTENT_DOWNLOAD, __('error_document'), message); this.handleDownloadError(error, pdfUrl); }); }