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 an API error results in a BadRequest exception being thrown, client code using the gem only has access to the exception message as a ruby hash literal - meaning that eval must be called to change it into a format from which the actual message or error code can be extracted.
While regexp matching could be used as a slightly-more-secure workaround, in cases where either exception error messages could be forwarded to end users or other logic is in place which examines the response body when an exception is thrown, this makes it clunky to work with exception data. If the request body were JSON-encoded before being set to the message of an exception, client code could at least parse the exception's message into a hash when thrown.
The text was updated successfully, but these errors were encountered:
when an API error results in a BadRequest exception being thrown, client code using the gem only has access to the exception message as a ruby hash literal - meaning that eval must be called to change it into a format from which the actual message or error code can be extracted.
While regexp matching could be used as a slightly-more-secure workaround, in cases where either exception error messages could be forwarded to end users or other logic is in place which examines the response body when an exception is thrown, this makes it clunky to work with exception data. If the request body were JSON-encoded before being set to the message of an exception, client code could at least parse the exception's message into a hash when thrown.
The text was updated successfully, but these errors were encountered: