Server not receiving requests, always returns 404.
Project ID: 1ca4e1b0-a98a-48de-b470-0b771a59a88b
For some reason whenever I send a post request to my server it will return 404 as if there is nothing listening on that endpoint even though the server is configured to listen on said endpoint. I've tried redeploying, recreating the service, recreating the project with no avail.
The source code for my project is located here if you think it may be a code issue but I seriously cannot find out why this is happening.
https://github.com/LuauProgrammer/payhip-to-parcel-whitelist/tree/master
GitHub
GitHub - LuauProgrammer/payhip-to-parcel-whitelist
Contribute to LuauProgrammer/payhip-to-parcel-whitelist development by creating an account on GitHub.
22 Replies
Project ID:
1ca4e1b0-a98a-48de-b470-0b771a59a88b
uncropped screenshot please
Even though there should be headers and a body, the server should still get the request and return 400 as thats what its designed to do if theyre not present.
send me the url please
If you're wondering what the server actually does, its supposed to receive a webhook from Payhip ( https://help.payhip.com/article/115-webhooks?_gl=1*1sv5izw*_ga*MzE4NDE2Mjg2LjE2OTE0MjIwNDA.*_ga_FQNQ7EMCFF*MTY5MTUyNjg5NC4yLjEuMTY5MTUyNzMzNi4yNS4wLjA ) and then whitelist the customer
Webhooks
Webhooks allow you to set up integrations which subscribe to certain events from your Payhip store. Currently, the only event available is the successful transa
I setup a mock server with Postman and Payhip is sending the webhook but the whitelist server doesn't receive it.
i assume this works locally?
Worked locally last time I did an actual change to the source code
I merged a pull request but it was just a semver version bump
Everything was working fine until railway changed their plans and the server went down
can you show me a screenshot of your service variables?
Mind if I DM you it?
I have API keys in my variables
i dont want to see your keys lol
keep them hidden
haha i do wanna see the webhook route though
im pretty sure you want that to start with a forward slash
I'll try
service is redeploying
gonna send a post request then ill get back to u
ur actually kidding meee omg wtf
ur a life saver i actually wouldve
never thought of that
i swear i made it automatically add a foward slash to the route
but ig not
const WEBHOOK_ROUTE = process.env.WEBHOOK_ROUTE || "/"
this means use process.env.WEBHOOK_ROUTE
and if that doesn't exist use "/"
instead
but process.env.WEBHOOK_ROUTE
did exist, and it didnt have a prefixed forward slash, so the environment variable was used as you typed it in the railway service variablesyeah i know i just didnt realize that
tysm for the help
no problem π