Skip to content

Commit

Permalink
fix: forgot to update _expected field in Exception class
Browse files Browse the repository at this point in the history
  • Loading branch information
amychisholm03 committed Jul 3, 2024
1 parent 113806b commit 8d25e43
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/errors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ class Exception {

getErrorDetails(config) {
const errorDetails = errorHelper.extractErrorInformation(null, this.error, config)
errorDetails.expected = errorHelper.isExpected(
errorDetails.type,
errorDetails.message,
null,
config,
urltils
)
if (typeof this._expected === 'undefined') {
this._expected = errorHelper.isExpected(
errorDetails.type,
errorDetails.message,
null,
config,
urltils
)
}
errorDetails.expected = this._expected

return errorDetails
}
Expand Down

0 comments on commit 8d25e43

Please sign in to comment.