Closed bakatz closed 7 years ago
I believe we are parsing, not sure why this happened. Please see this line where we parse the response body: https://github.com/opsgenie/opsgenie-nodejs-sdk/blob/4a0bf1300278b3ed1f5e00d18813ef2885108dca/lib/restApi.js#L131 I'll let the team know and check this, thanks.
Yep, I saw that line in the source code myself which is why I was confused. No problem
It's fixed and merged to master. We will publish the new version to the npm as soon as possible.
The following code prints: "string"
This is mildly annoying because, in order to reference any properties on
alerts
, I have to manually callJSON.parse(alerts)
myselfShouldn't the callback be called with the result obtained from
JSON.parse(...)
instead of just passing the raw response string to the callback?EDIT: also, my package.json includes this version of the SDK - "opsgenie-sdk": "^0.4.1"