#How do I trouble shoot my HTTP route showing 404 but its definitely deployed?
4 messages · Page 1 of 1 (latest)
Hi @restive inlet. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
If your HTTP route is showing a 404 error but you're sure it's deployed, you can follow these steps to troubleshoot:
-
Check that your HTTP actions were deployed: Visit the functions page (https://dashboard.convex.dev/deployment/functions) in the Convex dashboard and ensure there's an entry called
http. If not, verify that you've defined your HTTP actions with thehttpRouterin a file calledhttp.jsorhttp.tsand thatnpx convex devhas no errors. -
Check that you can access your endpoint using curl: Get your URL from the dashboard under Settings (https://dashboard.convex.dev/deployment/settings) > URL and Deploy Key. Make sure this is the URL that ends in
.convex.site, and not.convex.cloud. Run acurlcommand to hit one of your defined endpoints. Check the logs page (https://dashboard.convex.dev/deployment/logs) in the dashboard to confirm that there's an entry for your HTTP action. -
Check the request being made by your browser: If your HTTP actions have been deployed and are accessible via curl, but there are still issues requesting them from your app, check the exact requests being made by your browser. Open the Network tab in your browser's developer tools, and trigger your HTTP requests. Check that this URL matches what you tested earlier with curl -- it ends in
.convex.siteand has the right deployment name. You should be able to see these requests in the dashboard logs page (https://dashboard.convex.dev/deployment/logs).
If you see "CORS error" or messages in the browser console like Access to fetch at '...' from origin '...' has been blocked by CORS policy, you likely need to configure CORS headers and potentially add a handler for the pre-flight OPTIONS request.