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

replace %sveltekit.message% with %sveltekit.error.message% #6645

Closed
Rich-Harris opened this issue Sep 7, 2022 · 1 comment · Fixed by #6659
Closed

replace %sveltekit.message% with %sveltekit.error.message% #6645

Rich-Harris opened this issue Sep 7, 2022 · 1 comment · Fixed by #6659

Comments

@Rich-Harris
Copy link
Member

Rich-Harris commented Sep 7, 2022

Describe the problem

As of #6586 we have a standard way of dealing with errors in a SvelteKit app. It would make sense if we respected the App.PageError shape in src/error.html.

Describe the proposed solution

Change %sveltekit.message% to %sveltekit.error.message%. We could include other properties on the error object, but there are some caveats here (we can't allow any way for src/error.html to blow up during rendering) so for now we should probably just make that change, and worry about surfacing %sveltekit.error.code% or whatever as a post-1.0 thing

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

@Rich-Harris Rich-Harris added this to the 1.0 milestone Sep 7, 2022
@dummdidumm dummdidumm changed the title replace %sveltekit.error% with %sveltekit.error.message% replace %sveltekit.message% with %sveltekit.error.message% Sep 7, 2022
@msigwart
Copy link

worry about surfacing %sveltekit.error.code% or whatever as a post-1.0 thing

Are there plans for this already? Would be great to be able to show some other error props in the error.html.

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.

3 participants