hoodie-server
hoodie-server copied to clipboard
store/pre-auth-hook: error if no session token sent
If a request has no session token, then we do return reply(Boom.unauthorized()), but that only calls the next .then callback and sets session in it to Boom.unauthorized().
We have to throw an error instead and set error.status to 404 so that the .catch callback can take care of it
A corollary to this is the other line from the same function that does return reply.continue(), also resulting in an erroneous call to the next handler in the promise chain.
I think this is resolved as part of #526, see the comment at https://github.com/hoodiehq/hoodie-server/pull/526/files#diff-0c9cbe67579a94330b4f853044a4717dR43. Can you confirm that?
Yes, this is indeed now resolved, though the test suite is still throwing out a warning as a result of jupiter/simple-mock#22. I'll update the above PR to fix this only.