Skip to Content
API referenceOrbit CoreSrcComponentsnormalizeError()

@tuwaio/orbit-monorepo


normalizeError()

normalizeError(error): TuwaErrorState

Defined in: packages/orbit-core/src/utils/normalizeError.ts:145 

Normalizes any error into a persistence-safe TuwaErrorState.

Parameters

error

unknown

Any error value (Error, string, object, etc.)

Returns

TuwaErrorState

TuwaErrorState with user-friendly message and full raw details

Example

try { await sendTransaction(); } catch (e) { const normalized = normalizeError(e); set({ error: normalized }); }
Last updated on