trailblazer-endpoint
trailblazer-endpoint copied to clipboard
NoMethodError due to missing policy step
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?
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! :joy:
Well I don't know about making it completely "bullet-proof", but I sure as heck can shoot a few bullets into it 😉
:pray:
We need someone to use that piece of code and actually think about what makes sense. Will you be that rockstar?