-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components): dispatch
gs-error
event when an error occurs
closes #366
- Loading branch information
1 parent
9b7dd39
commit 1483a10
Showing
4 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
export * from './web-components'; | ||
|
||
export { type ErrorEvent, UserFacingError } from './preact/components/error-display'; | ||
|
||
declare global { | ||
interface HTMLElementEventMap { | ||
'gs-error': ErrorEvent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Meta } from '@storybook/blocks'; | ||
|
||
<Meta title='Components/Error Handling' /> | ||
|
||
# Error Handling | ||
|
||
All components dispatch a `gs-error` event of type `ErrorEvent` when an error occurs. | ||
The event contains an `error` property that holds the `Error` object. |