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

Failure in page endpoint results in incorrect message when navigated to client-side, but not when hard reloaded #4802

Closed
elliott-with-the-longest-name-on-github opened this issue May 3, 2022 · 5 comments · Fixed by #5314
Milestone

Comments

@elliott-with-the-longest-name-on-github
Copy link
Contributor

Describe the bug

The error passed to the load function of __error.svelte is a generic 500: Failed to load data when navigating client-side to a page with a page endpoint. However, refreshing the page or visiting it directly (causing it to be fetched directly from the server) results in the correct error.

Reproduction

  1. Go here: https://github.com/tcc-sejohnson/kit-exception-bug-rero (yes, there's a typo...)
  2. Read the README
  3. See the error

Logs

You asked for it.

Oh noooooo
Oh noooooo
Oh noooooo
Oh noooooo
Oh noooooo
Oh noooooo

System Info

System:
    OS: Linux 5.16 Pop!_OS 22.04 LTS
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 26.11 GB / 31.32 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.0.0 - ~/.nvm/versions/node/v18.0.0/bin/node
    Yarn: 1.22.17 - ~/.yarn/bin/yarn
    npm: 8.6.0 - ~/.nvm/versions/node/v18.0.0/bin/npm
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.40 
    @sveltejs/kit: next => 1.0.0-next.324 
    svelte: ^3.44.0 => 3.48.0

Severity

annoyance

Additional Information

Seems like the error code is always correct at least... :)

@cdcarson
Copy link
Contributor

cdcarson commented May 3, 2022

As of a month or two ago this issue was being tracked in this PR #4032.

I described what I thought was a decent fix, but I haven't heard back.

@elliott-with-the-longest-name-on-github
Copy link
Contributor Author

Interesting! That PR appears to deal with some of the confusing bits brought up by #4801 as well. Error handling is one of the strangely-furry parts of Kit right now, unfortunately. 🙂

@georgecrawford
Copy link
Contributor

My PR is stale because I asked for help and advice for the maintainers. I didn’t want to pester but I’m stuck on determining the right way forward.

@elliott-with-the-longest-name-on-github
Copy link
Contributor Author

George, have you tried asking for help in the Discord #contributing channel? That can be a good place to ask for help without feeling too "pester"-y. :)

@cdcarson
Copy link
Contributor

cdcarson commented May 7, 2022

@georgecrawford Hey I hope you don't feel that I was complaining about you not responding to my comment on your pr. It's just that, as far as I know, that's where the issue lived last time I checked. In fact, just like you, I was unsure how to proceed when I posted on your pr. :-)

The fact remains, this is a bug that needs fixing.

@tcc-sejohnson Can you shoot us a link to the Discord #contributing channel? The one I'm on now seems to be about something else. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants