Class: ActiveModel::ValidationError
- Inherits:
-
Object
- Object
- ActiveModel::ValidationError
- Defined in:
- app/api/core/service/error_handling.rb
Instance Method Summary collapse
Instance Method Details
#api_error(response) ⇒ Object
79 80 81 82 |
# File 'app/api/core/service/error_handling.rb', line 79 def api_error(response) io_handler = ::Core::Io::Registry.instance.lookup_for_object(model) response.content_error(422, errors_grouped_by_attribute { |attribute| io_handler.json_field_for(attribute) }) end |