IBM / node-sdk-core

The node-sdk-core repository contains core functionality required by code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
19 stars 24 forks source link

fix: correctly handle empty response bodies #239

Closed dpopp07 closed 1 year ago

dpopp07 commented 1 year ago

There are cases, such as a HEAD request, where the response body will have a JSON content type but the body will be empty (i.e. an empty string). This is technically valid JSON but is not parsable into an object, so the code throws an exception. This commit adds specific handling for this scenario, as well as a couple of test cases

ibm-devx-sdk commented 1 year ago

:tada: This PR is included in version 4.0.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: