Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture error message from experimental API response #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gschneider-r7
Copy link
Contributor

Description

Capture the error message from experimental API responses.

Example output (names have been changed to protect the innocent):

Nexpose::APIError: NexposeAPI: PUT request to /my/experimental/endpoint failed. response message: The thing supplied does not exist.
	from /Users/gschneider/.rvm/gems/ruby-2.4.0/gems/nexpose-6.0.0/lib/nexpose/ajax.rb:170:in `request'
	from /Users/gschneider/.rvm/gems/ruby-2.4.0/gems/nexpose-6.0.0/lib/nexpose/ajax.rb:49:in `put'

Motivation and Context

The experimental errors have a nice response and the request body is not really useful for debugging.

How Has This Been Tested?

Built the gem locally and tested a specific endpoint that I was having trouble with.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have updated the documentation accordingly (if changes are required).
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant