Skip to content

JSONAPI::Utils::Exceptions::BadRequest undefined #89

@melriffe

Description

@melriffe

Howdy!

I'm using the following gems:

  • jsonapi-resources (0.9.0)
  • jsonapi-utils (0.7.2)

I recently started using this gem and have found it quite useful. Thanks. However I tried to use jsonapi_render_bad_request and I got the following error:

# NameError:
#   uninitialized constant JSONAPI::Utils::Exceptions::BadRequest

It looks like the original refactoring to split up the exceptions into separate files resulted in BadRequest getting skipped/forgotten.

It seems, and this is without knowing the current design philosophy, updating jsonapi_render_bad_request to use JSONAPI::Exceptions::BadRequest directly, overriding detail: to match the original Utils BadRequest implementation could be one solution.

Another would be to implement JSONAPI::Utils::Exceptions::BadRequest.

Another would be to remove jsonapi_render_bad_request.

I'm happy to submit a pull request for any of those proposed solutions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions