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
For SonyCiApi::HttpError, which wraps Faraday::Error, it is currently fetching the error message from the Faraday::Error object, which is generic, e.g. "there was a problem and the server returned status 400", or something like that.
Meanwhile, the real error is embedded in Faraday::Error#response['body'] which is a JSON string. Once parsed, a better error message can be found.
NOTE: Sony Ci puts the error message under a couple different properties. One of them is either error or error_messge, or maybe it's error.message? I don't recall off hand, but I think this is the most common one. But another one place they put it is in error_description, so it will take some trial and error to figure out where the error messages are stashed. If we miss one, then we should fallback to the Faraday::Error#message value.
Done when
SonyCiApi::HttpErro#message returns the error message contained within the Sony Ci api http response, which is in the Faraday::Error#response, if present.
if not present, then falls back to the value of Faraday::Error#message
The text was updated successfully, but these errors were encountered:
Because
For
SonyCiApi::HttpError
, which wrapsFaraday::Error
, it is currently fetching the error message from theFaraday::Error
object, which is generic, e.g. "there was a problem and the server returned status 400", or something like that.Meanwhile, the real error is embedded in
Faraday::Error#response['body']
which is a JSON string. Once parsed, a better error message can be found.NOTE: Sony Ci puts the error message under a couple different properties. One of them is either
error
orerror_messge
, or maybe it'serror.message
? I don't recall off hand, but I think this is the most common one. But another one place they put it is inerror_description
, so it will take some trial and error to figure out where the error messages are stashed. If we miss one, then we should fallback to theFaraday::Error#message
value.Done when
SonyCiApi::HttpErro#message
returns the error message contained within the Sony Ci api http response, which is in theFaraday::Error#response
, if present.Faraday::Error#message
The text was updated successfully, but these errors were encountered: