ManageIQ / azure-armrest

Ruby interface for Azure using the new REST API
Apache License 2.0
15 stars 36 forks source link

Handle application/xml exception content-types #406

Closed agrare closed 3 years ago

agrare commented 3 years ago

If an Azure REST API call returns an error response with a content-type of application/xml then trying to JSON.parse() or err.try(:message) is leading to invalid exception message strings being returned.

Fixes https://github.com/ManageIQ/azure-armrest/issues/405

djberg96 commented 3 years ago

Looks good to me. I'm amazed it took 6 years to hit this.

agrare commented 3 years ago

@djberg96 let me run a cross-repo-test with the azure provider before we merge this

agrare commented 3 years ago

@miq-bot cross-repo-tests manageiq-providers-azure

miq-bot commented 3 years ago

Checked commit https://github.com/agrare/azure-armrest/commit/64b7810fbc1275aad53f03a51f7006dd4bd81690 with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint 1 file checked, 1 offense detected

lib/azure/armrest/armrest_service.rb

agrare commented 3 years ago

Cross-repo tests are green: https://github.com/ManageIQ/manageiq-cross_repo-tests/pull/354

agrare commented 3 years ago

Released v0.11.0 with this change