We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b2899 commit b5b52b9Copy full SHA for b5b52b9
1 file changed
lib/mock/mock-utils.js
@@ -367,7 +367,7 @@ function buildMockDispatch () {
367
try {
368
mockDispatch.call(this, opts, handler)
369
} catch (error) {
370
- if (error instanceof MockNotMatchedError) {
+ if (error.code === 'UND_MOCK_ERR_MOCK_NOT_MATCHED') {
371
const netConnect = agent[kGetNetConnect]()
372
if (netConnect === false) {
373
throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)
0 commit comments