Next.js Discord

Discord Forum

Can errors in default.js be handled by sibling error.js

Unanswered
Norwegian Lundehund posted this in #help-forum
Open in Discord
Norwegian LundehundOP
Given the following structure
src/
  app/
    admin/
      layout.tsx
      page.tsx
      @sidebar/
        default.tsx
        error.tsx

I'm noticing that if an error is thrown from my parallel route's server component in /src/app/admin/@sidebar/default.tsx then it is not being caught and handled by the /src/app/admin/@sidebar/error.tsx component. Is that to be expected?
For context: I'm trying to create a parallel route that shows up on all pages under /admin in my app and I'm using default.tsx to achieve that.

0 Replies