ManageIQ / manageiq-api-client

Ruby client library to the ManageIQ REST API
MIT License
11 stars 26 forks source link

Exceptions are not being properly raised #81

Closed bdunne closed 4 years ago

bdunne commented 6 years ago

Errors are currently incorrect:

$ api get /api/users/2
{
  "error": {
    "kind": "not_found",
    "message": "Couldn't find User with 'id'=2",
    "klass": "ActiveRecord::RecordNotFound"
  }
}

Should be:

$ api get /api/users/2
{
  "error": {
    "kind": "not_found",
    "message": "Couldn't find resource with 'id' 2",
    "klass": "RuntimeError"
  }
}
gtanzillo commented 4 years ago

Fixed with https://github.com/ManageIQ/manageiq-api-client/pull/82