App Bridge shows TypeError: Failed to fetch when request is blocked — expected a network error

Topic summary

Issue: During local development of a Shopify app (Shopify Remix template), blocking a specific endpoint via Chrome DevTools (Network → Block request URL) leads App Bridge–wrapped fetch to throw a generic “TypeError: Failed to fetch” originating from app-bridge.js, rather than a clear, classifiable network error.

Repro steps:

Expectation: Either a clearly identifiable network error that can be caught and handled, or a normalized App Bridge error (e.g., network/blocked request), not a generic TypeError.

Impact: Hard to distinguish between network blocking, CORS failures, server unavailability, and intentional DevTools blocking, complicating debugging and error handling.

Requests for guidance:

  • Is this the expected App Bridge behavior?
  • Recommended way to distinctly detect network-level failures?
  • Others’ experiences with similar local debugging scenarios?

Status: Unresolved; seeking confirmation and best practices. An image (stack trace) is provided.

Summarized with AI on December 16. AI used: gpt-5.

Hi everyone,

I’m running into an App Bridge behavior that’s confusing during local development and wanted to check if this is expected or a known issue.

What I’m doing

  • I have a Shopify app based on shopify remix template

  • During local development, I blocked a specific API endpoint using Chrome DevTools → Network → Block request URL

    http://localhost:4000/app/cornercart/config/sync
    
  • I then triggered the code path that fetches this endpoint.

What happens

Instead of receiving a clear network error, the app throws:

TypeError: Failed to fetch
    at app-bridge.js
    at fetchReqWrapper(...)
    at triggerSyncMetaObjectAPI(...)

The error originates from inside app-bridge.js (screenshot below).

What I expected

I was expecting either:

  • A clearly identifiable network error that I can catch and handle in my app, or
  • A normalized App Bridge error (e.g. network/blocked request) instead of a generic TypeError: Failed to fetch.

At the moment, it’s hard to differentiate between:

  • Network blocking
  • CORS issues
  • Server down
  • Manual DevTools request blocking

Why this matters

This makes debugging local/dev issues harder and also complicates error handling logic in apps that rely on App Bridge–wrapped fetch calls.

Questions

  • Is this expected behavior from App Bridge?
  • Is there a recommended way to detect network-level failures distinctly?
  • Has anyone else run into this while debugging locally?

I also just got this error “TypeError failed to fetch” in app-bridge.js. Unfortunately for me, it happened in production and it is not entirely clear why.

Would really like to know what happened as this is pretty hard to debug with such a generic message.