Class: ActiveRecord::RecordInvalid
- Inherits:
-
Object
- Object
- ActiveRecord::RecordInvalid
- Defined in:
- app/api/core/service/error_handling.rb
Instance Method Summary collapse
Instance Method Details
#api_error(response) ⇒ Object
67 68 69 70 |
# File 'app/api/core/service/error_handling.rb', line 67 def api_error(response) io_handler = ::Core::Io::Registry.instance.lookup_for_object(record) response.content_error(422, errors_grouped_by_attribute { |attribute| io_handler.json_field_for(attribute) }) end |