From f5fd24a61f8f77b1090c8278cc6446739ff44f9c Mon Sep 17 00:00:00 2001 From: Andreas Erhard Date: Wed, 22 Apr 2020 13:35:45 +0200 Subject: [PATCH] Preserve error types during translation By preserving the exception type, more fine-grained error handling can be performed via client-side logic (e.g. redirect to a search page if a PDF is not found, or to a ticket system in case of invalid PDF files). The original exception is now re-thrown. Fixes #11658 --- web/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index 8261040c0de87..720016c082343 100644 --- a/web/app.js +++ b/web/app.js @@ -817,7 +817,7 @@ const PDFViewerApplication = { return loadingErrorMessage.then(msg => { this.error(msg, { message }); - throw new Error(msg); + throw exception; }); } );