You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a route of products/abc/123, I expect the output to be Category: abc, ID: 123
Actual behavior
The actual output is Category: abc, ID: undefined
Related information
It seems there's some sort of type checking going on behind the scenes and any value that is either a Number, Null, or Boolean in javascript doesn't get captured. E.g. products/abc/null or products/abc/true also return undefined. You can dump request.params and see that the keys simply don't exist.
The existence of a constraint or optional qualifier ? doesn't seem to make a difference. I only included it above because that's a verbatim example from the documentation.
I'm running version 4.0.5198 locally. I can confirm the same issue occurs in a production Azure environment with Node 20. I have not had the chance to test other versions of Core Tools or Node.
The text was updated successfully, but these errors were encountered:
Hi @jwhazel thanks for reporting - I'm going to close as duplicate of #285 (it was in a different repo, but I just transferred it to this repo). Please see this comment for the recommended workaround: #285 (comment)
Repro steps
Create a function with dynamic route parameters that either have no constraints, or accept constraints other than
alpha
. The v4 example here will suffice: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cfunctionsv2&pivots=programming-language-javascript#customize-the-http-endpointExpected behavior
Given a route of
products/abc/123
, I expect the output to beCategory: abc, ID: 123
Actual behavior
The actual output is
Category: abc, ID: undefined
Related information
products/abc/null
orproducts/abc/true
also return undefined. You can dumprequest.params
and see that the keys simply don't exist.?
doesn't seem to make a difference. I only included it above because that's a verbatim example from the documentation.The text was updated successfully, but these errors were encountered: