err.response_stringified = JSON.stringify(response);
^
TypeError: Cannot set property 'response_stringified' of null
at handleResponse (/mnt/Code/node_modules/opsgenie-sdk/lib/restApi.js:124:38)
at Request.<anonymous> (/mnt/Code/node_modules/opsgenie-sdk/lib/restApi.js:110:9)
at Request._callback (/mnt/Code/node_modules/opsgenie-sdk/node_modules/requestretry/node_modules/lodash/lodash.js:10067:25)
at Request.requestRetryReply [as reply] (/mnt/Code/node_modules/opsgenie-sdk/node_modules/requestretry/index.js:105:19)
at Request.<anonymous> (/mnt/Code/node_modules/opsgenie-sdk/node_modules/requestretry/index.js:133:10)
at Request.self.callback (/mnt/Code/node_modules/request/request.js:188:22)
at Request.emit (events.js:110:17)
at Request.<anonymous> (/mnt/Code/node_modules/request/request.js:1171:10)
at Request.emit (events.js:107:17)
at IncomingMessage.<anonymous> (/mnt/Code/node_modules/request/request.js:1091:12)
at IncomingMessage.g (events.js:199:16)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)
The error is in this part:
if (response.statusCode < 200 || response.statusCode >= 300) {
if (process.env.NODE_ENV === 'development') {
err.response_stringified = JSON.stringify(response);
}```
The error is in this part: