An error with an explicit kind, a stable code, and a user-safe message kept separate from its internal cause.
throw userError({ code: 'PROJECT_LOAD_FAILED', message: 'Project could not be loaded.', cause: error,}); Copy
throw userError({ code: 'PROJECT_LOAD_FAILED', message: 'Project could not be loaded.', cause: error,});
Optional
Readonly
An error with an explicit kind, a stable code, and a user-safe message kept separate from its internal cause.
Example