Skip to main content

shared/utils/errorHandling

Shared error handling utilities for async operations.

Remarksโ€‹

Provides a unified pattern for error logging, reporting, and state management across frontend and backend code.

Exampleโ€‹

Frontend usage:

await withErrorHandling(() => doSomethingAsync(), store);

Backend usage:

await withErrorHandling(() => doSomethingAsync(), {
logger,
operationName: "operation",
});

Interfacesโ€‹

Functionsโ€‹