While executing a GET https://resource-controller.cloud.ibm.com/v2/resource_instances/ID an error is returned in XML format:
<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>\nAn error occurred while processing your request.<p>\nReference #97.a5a83817.1649175424.3958d93\n</BODY></HTML>\n
[JSON::ParserError]: 859: unexpected token at '<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>\nAn error occurred while processing your request.<p>\nReference #97.a5a83817.1649175424.3958d93\n</BODY></HTML>\n
/opt/IBM/infrastructure-management-gemset/gems/json-2.6.1/lib/json/common.rb:216:in `parse'
/opt/IBM/infrastructure-management-gemset/gems/json-2.6.1/lib/json/common.rb:216:in `parse'
/opt/IBM/infrastructure-management-gemset/gems/ibm_cloud_sdk_core-1.1.3/lib/ibm_cloud_sdk_core/api_exception.rb:15:in `initialize'
/opt/IBM/infrastructure-management-gemset/gems/ibm_cloud_sdk_core-1.1.3/lib/ibm_cloud_sdk_core/base_service.rb:113:in `new'
/opt/IBM/infrastructure-management-gemset/gems/ibm_cloud_sdk_core-1.1.3/lib/ibm_cloud_sdk_core/base_service.rb:113:in `request'
I'm unsure if API errors in XML format are possible and should be handled by this library, or if the service returning an XML formatted error is the underlying bug here (seems more likely).
While executing a
GET https://resource-controller.cloud.ibm.com/v2/resource_instances/ID
an error is returned in XML format:Which then fails here https://github.com/IBM/ruby-sdk-core/blob/main/lib/ibm_cloud_sdk_core/api_exception.rb#L15 trying to parse this as JSON:
I'm unsure if API errors in XML format are possible and should be handled by this library, or if the service returning an XML formatted error is the underlying bug here (seems more likely).