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

500 error when include param is empty #1211

Closed
2 of 7 tasks
Eunix opened this issue Jan 9, 2019 · 1 comment
Closed
2 of 7 tasks

500 error when include param is empty #1211

Eunix opened this issue Jan 9, 2019 · 1 comment

Comments

@Eunix
Copy link

Eunix commented Jan 9, 2019

This issue is a (choose one):

  • Problem/bug report.
  • Feature request.
  • Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead.

Checklist before submitting:

  • I've searched for an existing issue.
  • I've asked my question on Gitter and have not received a satisfactory answer.
  • I've included a complete bug report template. This step helps us and allows us to see the bug without trying to reproduce the problem from your description. It helps you because you will frequently detect if it's a problem specific to your project.
  • The feature I'm asking for is compliant with the JSON:API spec.

Description

There is 500 error on branch 0.9.x when trying to access a resource with empty include param, e.g. https://server/resource?include=. The error is no implicit conversion of nil into Array.

Internal Server Error: no implicit conversion of nil into Array /usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/jsonapi-resources-0.9.3/lib/jsonapi/request_parser.rb:219:in `+'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/jsonapi-resources-0.9.3/lib/jsonapi/request_parser.rb:219:in `parse_include_directives'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/jsonapi-resources-0.9.3/lib/jsonapi/request_parser.rb:46:in `setup_index_action'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/jsonapi-resources-0.9.3/lib/jsonapi/request_parser.rb:38:in `setup_action'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/jsonapi-resources-0.9.3/lib/jsonapi/request_parser.rb:27:in `initialize'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/jsonapi-resources-0.9.3/lib/jsonapi/acts_as_resource_controller.rb:66:in `new'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/jsonapi-resources-0.9.3/lib/jsonapi/acts_as_resource_controller.rb:66:in `process_request'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/jsonapi-resources-0.9.3/lib/jsonapi/acts_as_resource_controller.rb:16:in `index'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/actionpack-5.0.7/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/actionpack-5.0.7/lib/abstract_controller/base.rb:188:in `process_action'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/actionpack-5.0.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/actionpack-5.0.7/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:126:in `call'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:455:in `call'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:448:in `block (2 levels) in around'
/usr/local/var/rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:286:in `block (2 levels) in halting'
@Eunix Eunix mentioned this issue Jan 9, 2019
12 tasks
@lgebhardt
Copy link
Member

Fixed with #1212 and release 0.9.5 made

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

2 participants