Update error()
and PageError
types to include details
property for more descriptive error messages
#6669
Labels
documentation
Improvements or additions to documentation
Describe the problem
When throwing an error, it would be nice to pass more info to the Error Page than just a single
message
property. Kit already allows me to pass an object to theerror()
function and access it in+error.svelte
. However, I get type errors.+page.server.ts
+error.svelte
Example Error Page
Describe the proposed solution
Update types for
PageError
interface anderror()
function to include an optional propertydetails
.ambient.d.ts
index.d.ts
Alternatives considered
Would be nice to include any # of optional properties but I'm not sure how to type that.
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: