Skip to content

Commit dcb5a27

Browse files
evgenyfedorenkobrandonroberts
authored andcommitted
docs: update book search failure action with only error message (#1984)
* docs: Update book search failure action with only error message Closes #1953
1 parent acc5fa0 commit dcb5a27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

projects/example-app/src/app/books/effects/book.effects.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('BookEffects', () => {
6161
const completion = BooksApiActions.searchFailure({
6262
errorMsg: 'Unexpected Error. Try again later.',
6363
});
64-
const error = 'Unexpected Error. Try again later.';
64+
const error = { message: 'Unexpected Error. Try again later.' };
6565

6666
actions$ = hot('-a---', { a: action });
6767
const response = cold('-#|', {}, error);

projects/example-app/src/app/books/effects/book.effects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class BookEffects {
5050
takeUntil(nextSearch$),
5151
map((books: Book[]) => BooksApiActions.searchSuccess({ books })),
5252
catchError(err =>
53-
of(BooksApiActions.searchFailure({ errorMsg: err }))
53+
of(BooksApiActions.searchFailure({ errorMsg: err.message }))
5454
)
5555
);
5656
})

0 commit comments

Comments
 (0)