kit icon indicating copy to clipboard operation
kit copied to clipboard

`App.PageError` should probably be renamed `App.Error`

Open Rich-Harris opened this issue 3 years ago • 1 comments

Describe the bug

...because it also applies to non-page requests (e.g. if you throw an error in handle or a +server.js file, it will go through handleError, and if it's a non-page request it will be turned into a JSON response).

Annoyingly, this would be a breaking change

Reproduction

N/A

Logs

No response

System Info

N/A

Severity

annoyance

Additional Information

No response

Rich-Harris avatar Sep 19 '22 20:09 Rich-Harris

If we do this, we could try minimize impact by checking if there's an src/app.d.ts and if that contains PageError rename that to Error during sync.

dummdidumm avatar Sep 20 '22 09:09 dummdidumm

@Rich-Harris - I am getting this issue. And there are no instance of PageError in my system. What do you think the issue may be?

N-NeelPatel avatar Oct 19 '22 12:10 N-NeelPatel

Does a full-text-search of PageError bring something up? If yes, is it inside app.d.ts? If yes, rename it there even if it's commented out. That should happen automatically in more recent versions of SvelteKit btw.

dummdidumm avatar Oct 19 '22 17:10 dummdidumm

@dummdidumm - It worked. Thanks. BTW why was it causing issue even though it was commented?

N-NeelPatel avatar Oct 20 '22 08:10 N-NeelPatel