Reworked Handling Of API Error Responses

This change allows the Ruby wrapper to take advantage of the extended error response being generated from the API.

/cc @GvS666