Skip to content

Commit 4c6a506

Browse files
committed
fix(rx-stateful): when handling errors it emitted by default the Error.message but it should emit the whole error object
1 parent b729c48 commit 4c6a506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/rx-stateful/src/lib/rx-stateful$.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ function deriveInitialValue<T, E>(mergedConfig: RxStatefulConfig<T,E>){
433433

434434
function handleError<T,E>(error: E, mergedConfig: RxStatefulConfig<T, E>, error$$: Subject<RxStatefulWithError<T, E>>){
435435
mergedConfig?.beforeHandleErrorFn?.(error);
436-
const errorMappingFn = mergedConfig.errorMappingFn ?? ((error: E) => (error as any)?.message);
436+
const errorMappingFn = mergedConfig.errorMappingFn ?? ((error: E) => (error as any));
437437
error$$.next({ error: errorMappingFn(error), context: 'error', isLoading: false,
438438
isRefreshing: false, value: null });
439439
return NEVER;

0 commit comments

Comments
 (0)