Hobby plan - External API calls failing with TypeError: fetch failed
brandonbrown1up-lgtm
HOBBYOP

2 months ago

I'm on the Hobby plan and getting "TypeError: fetch failed" when my Node.js backend tries to call external APIs.

Error: fetch() calls to external domains fail consistently

Environment: Node.js 18 on Railway Hobby plan

Error logs show:

- TypeError: fetch failed

- Happens on all external HTTPS API endpoints

Use case: My application needs to integrate with third-party SaaS APIs

Question: Is network egress/external API access enabled on the Hobby plan? If not, how can I enable it?

Thanks!

$10 Bounty

3 Replies

fra
HOBBYTop 10% Contributor

2 months ago

No, there are no blocks to outbound requests to third part api, I can send request to external API without problems (Stripe/Aws/etc...)...are there any firewall on the API side? Did you try connecting via ssh in the container and try to send a curl request to the API?


fra

No, there are no blocks to outbound requests to third part api, I can send request to external API without problems (Stripe/Aws/etc...)...are there any firewall on the API side? Did you try connecting via ssh in the container and try to send a curl request to the API?

brandonbrown1up-lgtm
HOBBYOP

2 months ago

Thanks for confirming Railway supports external API calls!

I ran diagnostics and found:

- white_check_mark emoji GitHub API works (200 OK)

- x emoji Supabase JS client fails with "TypeError: fetch failed"

- x emoji GHL API returns 401 "Unauthorized, Switch to the new API token"

The Supabase failure is blocking my entire app. Do you know why the Supabase JavaScript client (@supabase/supabase-js) would fail with "fetch failed" when direct fetch() calls to GitHub work fine?

My Supabase URL is: https://uwcgzdsrumcbktwugdc.supabase.co

Is there something specific about Railway's environment that would cause the Supabase client to fail?


fra
HOBBYTop 10% Contributor

2 months ago

Can you add some log on the request and share the error? Did you add the right API key? Can you confirm the API key is read correctly in the app? Maybe the app is not reading correctly the env variables?


Loading...