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

NoMethodError due to missing policy step #4

Open
KonstantinKo opened this issue Feb 15, 2017 · 4 comments
Open

NoMethodError due to missing policy step #4

KonstantinKo opened this issue Feb 15, 2017 · 4 comments

Comments

@KonstantinKo
Copy link

KonstantinKo commented Feb 15, 2017

When there is no policy step defined but an operation fails due to not being logged in at all, in the evaluation for the unauthenticated endpoint you get a NoMethodError: undefined method 'failure?' for nil:NilClass because result['result.policy.default'] is nil.

The comment # FIXME: we might need a &. here ;) in lib/trailblazer/endpoint.rb:22 seems to in fact be correct. But then again, the policy isn't always under the default namespace, is it?

@apotonick
Copy link
Member

This is totally WIP and in fact I was hoping for someone clever like yourself to jump on this and make it bullet-proof.

Note: no &. though, haha! 😂

@KonstantinKo
Copy link
Author

Well I don't know about making it completely "bullet-proof", but I sure as heck can shoot a few bullets into it 😉

@apotonick
Copy link
Member

🙏

@apotonick
Copy link
Member

We need someone to use that piece of code and actually think about what makes sense. Will you be that rockstar?

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