We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4bcfbb3 + 2eb3d50 commit e91f274Copy full SHA for e91f274
src/modules/request-recorder.js
@@ -98,7 +98,7 @@ export default (opts) => {
98
// convert 404 response code to 500
99
const destroyOriginal = req.destroy;
100
req.destroy = (err) => {
101
- if (err.status === 404 && err.statusCode === 404 && err.code === 'ERR_NOCK_NO_MATCH') {
+ if (err?.status === 404 && err?.statusCode === 404 && err?.code === 'ERR_NOCK_NO_MATCH') {
102
// eslint-disable-next-line no-param-reassign
103
err.statusCode = 500;
104
0 commit comments