Skip to content
Discussion options

You must be logged in to vote

Someone found the solution for me.

Actually, the requests sent by the failing tests, even though they were supposed to test other request handlers, were already caught and processed by router.get("/:clientId", ... by mistake, even before I introduced the new authClient middleware. This was due to router.get("/:clientId", ... located at the beginning of the source code file, before the other router's request handlers.

The solution was to move the router.get("/:clientId", ... request handler to the bottom of the source code file, and to turn mandatory path parameters into optional ones to make sure they still get caught by the right request handlers.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SkypLabs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant