Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
melriffe opened this issue May 30, 2018 · 0 comments
Open

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

melriffe opened this issue May 30, 2018 · 0 comments

Comments

@melriffe
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant