error: extend ErrorMessage & helpers for improved ergonomics

- added isRawError helper
- added catchErrorString helper to convert any error to a string
- added checkGraphResponse to throw if error is present or data missing
- ErrorMessage now supports wrapping multiple errors ergonomically
This commit is contained in:
Elijah Duffy
2026-04-15 17:04:32 -07:00
parent c991ac044f
commit 740e038382
2 changed files with 105 additions and 28 deletions

View File

@@ -67,7 +67,14 @@ export {
ToolbarGroup,
Toolbar
} from './Toolbar';
export { type GraphError, type RawError, ErrorMessage } from './error';
export {
type GraphError,
type RawError,
isRawError,
catchErrorString,
checkGraphResponse,
ErrorMessage
} from './error';
export {
NavigationItem,
NavigationManager,