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

Better error messages for incorrect form actions #11876

Closed
eltigerchino opened this issue Feb 20, 2024 Discussed in #11865 · 1 comment · Fixed by #13167
Closed

Better error messages for incorrect form actions #11876

eltigerchino opened this issue Feb 20, 2024 Discussed in #11865 · 1 comment · Fixed by #13167
Labels

Comments

@eltigerchino
Copy link
Member

Discussed in #11865

Originally posted by thebjorn February 18, 2024
I just got this error:

SvelteKitError: POST method not allowed. No actions exist for this page

I was trying to post from /my/special/page to /logout?next=/goodbye, so it's not exactly clear what "this page" means in this context, especially if you're not experienced (e.g. does it mean a +..page.. file, a path/url, or a route..?).

What can be improved:

  1. give me all the information the error handler has - or can gather (it's already an error so there shouldn't be any concerns about using cycles to gather input).
  2. give me an error number (SvelteKitError[E042]: ...) that I can look up to find more information (or even make the error number a link to the docs?)
@mig-hub
Copy link

mig-hub commented Dec 18, 2024

Not sure it helps at all but I experienced issues like this when using a 307 redirect inside the action. Then worked with a 302.

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