diff --git a/libs/rx-stateful/src/lib/rx-stateful$.ts b/libs/rx-stateful/src/lib/rx-stateful$.ts index 7d7cac5..84b5ef3 100644 --- a/libs/rx-stateful/src/lib/rx-stateful$.ts +++ b/libs/rx-stateful/src/lib/rx-stateful$.ts @@ -433,7 +433,7 @@ function deriveInitialValue(mergedConfig: RxStatefulConfig){ function handleError(error: E, mergedConfig: RxStatefulConfig, error$$: Subject>){ mergedConfig?.beforeHandleErrorFn?.(error); - const errorMappingFn = mergedConfig.errorMappingFn ?? ((error: E) => (error as any)?.message); + const errorMappingFn = mergedConfig.errorMappingFn ?? ((error: E) => (error as any)); error$$.next({ error: errorMappingFn(error), context: 'error', isLoading: false, isRefreshing: false, value: null }); return NEVER;