Skip to content

Commit

Permalink
Ensure that PasswordException is handled correctly in the `wrapReas…
Browse files Browse the repository at this point in the history
…on` function

While running the unit-tests with some logging statements added to this code, I noticed that `PasswordException` was missing from the list of potential Errors that could be passed to the `wrapReason` function.
  • Loading branch information
Snuffleupagus committed Aug 28, 2021
1 parent 153d058 commit 9ea3fa0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shared/message_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
assert,
createPromiseCapability,
MissingPDFException,
PasswordException,
UnexpectedResponseException,
UnknownErrorException,
warn,
Expand Down Expand Up @@ -64,6 +65,8 @@ function wrapReason(reason) {
return new AbortException(reason.message);
case "MissingPDFException":
return new MissingPDFException(reason.message);
case "PasswordException":
return new PasswordException(reason.message, reason.code);
case "UnexpectedResponseException":
return new UnexpectedResponseException(reason.message, reason.status);
case "UnknownErrorException":
Expand Down

0 comments on commit 9ea3fa0

Please sign in to comment.