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
Since ctx.URL().Path give the path with the prefix, for example /api/ressources/1, the /api prefix stay in the path given for the request, and the router does not find the route:
When a prefix is present in the path, the autopatch feature does not work as expected.
A 404 error occurs when a
PATCH
request is sent to the server.Minimal Reproductible Example
Technical details
The probleme is here:
huma/autopatch/autopatch.go
Line 185 in 7c5c0d3
Since
ctx.URL().Path
give the path with the prefix, for example/api/ressources/1
, the/api
prefix stay in the path given for the request, and the router does not find the route:huma/autopatch/autopatch.go
Line 214 in 7c5c0d3
Possible Solution
I made an MR showing a potential solution here #714
The text was updated successfully, but these errors were encountered: