Effect CommunityEC
Effect Community16mo ago
4 replies
RJ

Debugging 404 Errors in HTTP API Web Handler

I've got an HTTP API web handler (via HttpApiBuilder.toWebHandler), which is returning 404s for requests that it seems like it shouldn't, but I'm not sure how best to debug it. For the given code, for example:

console.log("request.url", request.url);
console.log("request.method", request.method);

HttpApi.reflect(api, {
  onGroup: () => {},
  onEndpoint: ({ endpoint }) => {
    console.log("endpoint.path", endpoint.path);
    console.log("endpoint.method", endpoint.method);
  },
});

...

webHandler(request)


Given a test request, I see the following logs:

'request.url' 'https://colorful-mole-656.convex.site/get'
'request.method' 'GET'
'endpoint.path' '/get'
'endpoint.method' 'GET'


but get a 404
Was this page helpful?