Skip to content

Commit 9ea3fa0

Browse files
committed
Ensure that PasswordException is handled correctly in the wrapReason 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.
1 parent 153d058 commit 9ea3fa0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/shared/message_handler.js

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
assert,
1919
createPromiseCapability,
2020
MissingPDFException,
21+
PasswordException,
2122
UnexpectedResponseException,
2223
UnknownErrorException,
2324
warn,
@@ -64,6 +65,8 @@ function wrapReason(reason) {
6465
return new AbortException(reason.message);
6566
case "MissingPDFException":
6667
return new MissingPDFException(reason.message);
68+
case "PasswordException":
69+
return new PasswordException(reason.message, reason.code);
6770
case "UnexpectedResponseException":
6871
return new UnexpectedResponseException(reason.message, reason.status);
6972
case "UnknownErrorException":

0 commit comments

Comments
 (0)