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

[Bug] ThreeScale::Core::ServiceError.load_all - undefined method `map' for nil:NilClass #13

Open
Martouta opened this issue Sep 26, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@Martouta
Copy link
Contributor

Martouta commented Sep 26, 2018

When I load from system in development {{provider_url}}/apiconfig/errors, I see:
image
In case you want the stacktrace:

NoMethodError (undefined method `map' for nil:NilClass
Did you mean?  tap):
  app/services/integration_errors_service.rb:4:in `list'
  app/controllers/api/errors_controller.rb:13:in `block in index'
  app/controllers/api/errors_controller.rb:12:in `index'
  lib/three_scale/middleware/dev_domain.rb:25:in `call'
  lib/three_scale/middleware/dev_domain.rb:25:in `call'
  lib/three_scale/middleware/multitenant.rb:116:in `_call'
  lib/three_scale/middleware/multitenant.rb:111:in `call'

I can bypass it by changing this line:

APIClient::Collection.new(result[:attributes].map { |attrs| new attrs },

for:

APIClient::Collection.new((result[:attributes] || []).map { |attrs| new attrs },

but this is more a workaround to don't get stuck in what I have to do than an actual fix 😄 So just saying because it is not blocking or too urgent but it should be fixed at some point 😄

@Martouta Martouta added the bug Something isn't working label Sep 26, 2018
@Martouta Martouta changed the title ThreeScale::Core::ServiceError.load_all - undefined method `map' for nil:NilClass [Bug] ThreeScale::Core::ServiceError.load_all - undefined method `map' for nil:NilClass Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant