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.
This commit is contained in:
parent
153d058b3a
commit
9ea3fa0747
@ -18,6 +18,7 @@ import {
|
|||||||
assert,
|
assert,
|
||||||
createPromiseCapability,
|
createPromiseCapability,
|
||||||
MissingPDFException,
|
MissingPDFException,
|
||||||
|
PasswordException,
|
||||||
UnexpectedResponseException,
|
UnexpectedResponseException,
|
||||||
UnknownErrorException,
|
UnknownErrorException,
|
||||||
warn,
|
warn,
|
||||||
@ -64,6 +65,8 @@ function wrapReason(reason) {
|
|||||||
return new AbortException(reason.message);
|
return new AbortException(reason.message);
|
||||||
case "MissingPDFException":
|
case "MissingPDFException":
|
||||||
return new MissingPDFException(reason.message);
|
return new MissingPDFException(reason.message);
|
||||||
|
case "PasswordException":
|
||||||
|
return new PasswordException(reason.message, reason.code);
|
||||||
case "UnexpectedResponseException":
|
case "UnexpectedResponseException":
|
||||||
return new UnexpectedResponseException(reason.message, reason.status);
|
return new UnexpectedResponseException(reason.message, reason.status);
|
||||||
case "UnknownErrorException":
|
case "UnknownErrorException":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user