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
When getting an error from the API (eg a "400 Bad Request") we assign three things in the error instance:
message
status
data
message is set to response.message (response is a Net::HTTPResponse object) and consists of the actual HTTP error (eg "Bad Request"). IMO this is where things get a bit unclear. We already have the status (eg 400) so I don't believe the "Bad Request" is necessary. We should simply assign the API response to the message so we can use the great error messages the API generates.
The text was updated successfully, but these errors were encountered:
When getting an error from the API (eg a "400 Bad Request") we assign three things in the error instance:
message
status
data
message
is set toresponse.message
(response is aNet::HTTPResponse
object) and consists of the actual HTTP error (eg "Bad Request"). IMO this is where things get a bit unclear. We already have thestatus
(eg 400) so I don't believe the "Bad Request" is necessary. We should simply assign the API response to the message so we can use the great error messages the API generates.The text was updated successfully, but these errors were encountered: