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
If you create a project and register two function using the same route but different verbs, you get the error Error: Worker was unable to load entry point "xxx": a function with id "<route>" has already been registered.
Example:
// In functions/get-documents.tsapp.get('documents',{ ... });// In functions/post-documents.tsapp.post('documents',{ ... });
Having both of these functions creates a conflict on the ID, despite the fact that they're using different verbs.
Workaround is to use:
When using methods for HTTP verbs shortcuts, I would expect a unique id to be generated. This could be done easily by prefixing the verb to the route name when creating the id, ie <verb>-<route> so that the same route with different verbs like in my example do not generate a conflict.
Actual behavior
Currently, despite using different HTTP verbs, it seems that the generated id is only using the route, creating a conflict.
Known workarounds
Using app.http() instead of app.<verb>()
The text was updated successfully, but these errors were encountered:
Repro steps
If you create a project and register two function using the same route but different verbs, you get the error
Error: Worker was unable to load entry point "xxx": a function with id "<route>" has already been registered
.Example:
Having both of these functions creates a conflict on the ID, despite the fact that they're using different verbs.
Workaround is to use:
Expected behavior
When using methods for HTTP verbs shortcuts, I would expect a unique id to be generated. This could be done easily by prefixing the verb to the route name when creating the id, ie
<verb>-<route>
so that the same route with different verbs like in my example do not generate a conflict.Actual behavior
Currently, despite using different HTTP verbs, it seems that the generated id is only using the route, creating a conflict.
Known workarounds
Using
app.http()
instead ofapp.<verb>()
The text was updated successfully, but these errors were encountered: