jsonapi-rb / jsonapi-rails

Rails gem for fast jsonapi-compliant APIs.
http://jsonapi-rb.org
MIT License
321 stars 63 forks source link

Make ActiveModelError inherit from JSONAPI::Serializable::Error #31

Closed mdeutsch closed 7 years ago

mdeutsch commented 7 years ago

Having JSONAPI::Rails::ActiveModelError inherit from JSONAPI::Serializable::Error makes it more intuitive to extend it in application-specific ways. For example, defining status and code properties using the mechanisms provided in the base class.

beauby commented 7 years ago

Thanks for this. The end goal is, indeed, to provide a way to customize this, but at the moment I'm not sure what the best interface is, so I'll keep this open until we figure it out.