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

Non-GET shadow endpoint status response not respected #3721

Closed
Conduitry opened this issue Feb 4, 2022 · 1 comment
Closed

Non-GET shadow endpoint status response not respected #3721

Conduitry opened this issue Feb 4, 2022 · 1 comment
Labels
bug Something isn't working p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc.
Milestone

Comments

@Conduitry
Copy link
Member

Conduitry commented Feb 4, 2022

Describe the bug

Returning an error status (4xx/5xx) from a non-GET shadow endpoint is not properly being inherited by the final rendered page, which is always a 200 (assuming the implicit GET afterwards succeeded).

Reproduction

https://github.com/Conduitry-Repros/kit-3721

Logs

No response

System Info

System:
    OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Memory: 8.38 GB / 12.32 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Yarn: 1.22.15
    npm: 8.3.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.17 
    @sveltejs/kit: next => 1.0.0-next.260 
    svelte: ^3.44.0 => 3.46.4

Severity

blocking an upgrade

Additional Information

I assume this is because in load_node we are only looking at shadow.status when shadow.error or shadow.redirect are set. We should also look at shadow.status when the page has no load function (whether or not we have shadow.body).

I'm not sure about whether we want to use shadow.status if there's a mod.load and it doesn't return its own status.

@Conduitry Conduitry added the bug Something isn't working label Feb 4, 2022
@Rich-Harris Rich-Harris added this to the 1.0 milestone Mar 5, 2022
@benmccann benmccann added the p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc. label Mar 17, 2022
@Conduitry
Copy link
Member Author

This was resolved by #4328.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p1-important SvelteKit cannot be used by a large number of people, basic functionality is missing, etc.
Projects
None yet
Development

No branches or pull requests

3 participants