upstream connect error or disconnect/reset before headers. reset reason: protocol error
I have deployed an API created in Node.js on Railway and am getting errors trying to call it from a desktop app created in Tauri. Can you please help?
When I call the API from Tauri, I am getting the error 502
upstream connect error or disconnect/reset before headers. reset reason: protocol error
in the preflight request.
If I deploy the same application to Heroku, it works fine.18 Replies
Project ID:
e62600cd-1d5d-43f5-a38b-69f1d9ca4d96
e62600cd-1d5d-43f5-a38b-69f1d9ca4d96
does it work fine if you call it via postman
Yes, I tried with Postman, but I get a 502
upstream connect error or disconnect/reset before headers. reset reason: protocol error
errorwhat kind of api is this
GraphQL API server built with fastify and graphql-yoga.
what protocol does it use
https. I just changed it to http and postman returned status200.
perfect, yep you can only run an http app to access it externally from https
I'm sorry, I'm a little confused. when I run it in postman on http it works fine, but on https I get a 502. I want to access it on https, does that mean I have to go to http?
Also, I tried it with a non-postman client and got a 502 even with the http protocol!
your app needs to run as http, railway does the https for you
Yes, the API server itself is running at http and can also be connected to from the outside via https: https://revelup-noteapi-production.up.railway.app/
However, OPTIONS requests from postman to this API server result in a 502.
what endpoint should i test to get a 502?
that gives me a 301, i will use https
using https gives me a 502, i will see if i can reproduce this
if i cant reproduce this, that just means its an issue with your code
(heroku would be monkey patching it, railway runs your code as is)
will get back to you on this though
Thank you. I will continue to check on the code here as well.
@shwld i cant reproduce this, it would be an issue with your code, unfortunately I have no idea what the issue is
@Brody Thanks, I'll review the code.