Repository navigation
fix(web): send the Railway token as a RailwayConnectRequest instance - #1221
Conversation
The v1 integrations payloads are Schema.Class, so the client rejects a
plain `{ token }` object while encoding and never sends the PUT. Every
connect attempt showed "Failed to connect Railway" with no request
reaching the API. Construct the class, as the other connect flows do.
Maple review🟡 Confidence 3/5 · needs attention The Railway connect form now sends
Findings🟠 Warning · F1 · Over-long token throws in the
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (1)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Maple review🟡 Confidence 3/5 · needs attention Warning This review ended early; what follows is what it established. The Railway token form now validates the pasted token by decoding it into a
Still open from earlier reviews
What was checked
|
What
The Railway connect form now sends
new RailwayConnectRequest({ token })instead of a plain{ token }object. It's a one-line change inrailway-integration-card.tsx.Why
Connecting Railway in production always failed with "Failed to connect Railway", whatever token was used.
railwayConnectis a v1 endpoint, and its payload is aSchema.Class. The HttpApi client rejects a plain object when it encodes the payload, so the request is never sent. TypeScript accepts the plain object because it has the same shape. The Cloudflare, Hazel and GitHub connect flows already construct their request classes; the Railway form didn't.Evidence
http.client GET /api/integrations/railway/statusspans, but nohttp.client PUTfor the connect. maple-api has noPUT /api/integrations/railwayand noRailwayMetricsService.connectspan. The request never left the browser.Schema.encodeUnknownExit(RailwayConnectRequest)returnsFailurefor{ token }andSuccessfornew RailwayConnectRequest({ token }).Testing
RailwayMetricsService.connectspan.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit