zendesk_api_client_rb
zendesk_api_client_rb copied to clipboard
Improve Error Message for Record Invalid Errors
While attempting to merge 2 users together in Zendesk, I received a 422 response with the response body {"error"=>"You cannot merge Customer Name while they have an external ID."}
. However, this error message was not included in the raised exception. As a result, our exception monitoring tool only showed ZendeskAPI::Error::RecordInvalid: {}
without any details. This made determining the actual issue challenging.
I think modifying the code that generates the message for ZendeskAPI::Error::RecordInvalid
errors to use the message in the error
key of the response body, if necessary, will improve the usability of this exception.