You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
johnsaigle
changed the title
Get error message in non-success cases with WWW-style syntax
Get error message in non-success cases with WWW-style syntax
Apr 20, 2018
It sets :failonerror by default, which forces it to throw an exception on a non-2xx status code.
You can't really override that with the shortcut syntax. For example, this is get:
You need to stick an extra setopt(:!failonerror) in there before the perform. The GET itself sets :failonerror, so it will override any options that get passed in to the new.
Hmm... Maybe the error checking code could check for the bad status code type of error and stash the content into a special Exception type? Then you could CATCH the exception and still see the actual content. I don't have time to do that now, but perhaps sometime..
What is the syntax for retrieving error content using
WWW
syntax (if any)?Related to #6.
The text was updated successfully, but these errors were encountered: