Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors from within +layout.js are not being caught and passed to +error #6002

Closed
bdanoit opened this issue Aug 17, 2022 · 1 comment
Closed

Comments

@bdanoit
Copy link

bdanoit commented Aug 17, 2022

Describe the bug

Errors thrown from within +layout.js are not being caught and passed to +error.svelte

If I throw the error from +page.js it is being caught and passed to +error.svelte

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-f1qmuw?file=README.md

Logs

No response

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /bin/yarn
    npm: 7.17.0 - /bin/npm
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.64 
    @sveltejs/kit: next => 1.0.0-next.418 
    svelte: ^3.46.0 => 3.49.0 
    vite: ^3.0.0 => 3.0.8

Severity

serious, but I can work around it

Additional Information

No response

@Conduitry
Copy link
Member

Sounds like a duplicate of #3068. It's not immediately apparent what should happen when your top-level layout load throws an error, since that data is needed to render that layout, which is needed to render that top-level +error.page

@Conduitry Conduitry closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants