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

feat: display error info on 500 pages #235

Open
chrisvaillancourt opened this issue Aug 30, 2024 · 0 comments
Open

feat: display error info on 500 pages #235

chrisvaillancourt opened this issue Aug 30, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@chrisvaillancourt
Copy link
Owner

Astro v4.11 added an error prop allowing us to display more specific information about the error on a custom 500 page:

---
// src/pages/500.astro
interface Props {
  error: unknown;
}

const { error } = Astro.props;
---

<div>{error instanceof Error ? error.message : 'Unknown error'}</div>
@chrisvaillancourt chrisvaillancourt added the enhancement New feature or request label Aug 30, 2024
@chrisvaillancourt chrisvaillancourt self-assigned this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant