From 8d25e4331ad71019205b29b5bbe568e601d46c78 Mon Sep 17 00:00:00 2001 From: Amy Chisholm Date: Wed, 3 Jul 2024 09:11:53 -0700 Subject: [PATCH] fix: forgot to update _expected field in Exception class --- lib/errors/index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/errors/index.js b/lib/errors/index.js index 9713b7777f..5f6b4af510 100644 --- a/lib/errors/index.js +++ b/lib/errors/index.js @@ -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 }