We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6eddb72 commit 38f9825Copy full SHA for 38f9825
lib/errors/index.js
@@ -31,19 +31,18 @@ class Exception {
31
32
getErrorDetails(config) {
33
const errorDetails = errorHelper.extractErrorInformation(null, this.error, config)
34
- errorDetails.expected = this.isExpected(config, errorDetails)
35
-
36
- return errorDetails
37
- }
38
39
- isExpected(config, { type, message }) {
40
if (typeof this._expected === 'undefined') {
41
- this._expected =
42
- errorHelper.isExpectedErrorClass(config, type) ||
43
- errorHelper.isExpectedErrorMessage(config, type, message)
+ this._expected = errorHelper.isExpected(
+ errorDetails.type,
+ errorDetails.message,
+ null,
+ config,
+ urltils
+ )
44
}
+ errorDetails.expected = this._expected
45
46
- return this._expected
+ return errorDetails
47
48
49
0 commit comments