Skip to content

Commit

Permalink
docs: update book search failure action with only error message (#1984)
Browse files Browse the repository at this point in the history
* docs: Update book search failure action with only error message

Closes #1953
  • Loading branch information
evgenyfedorenko authored and brandonroberts committed Jul 1, 2019
1 parent acc5fa0 commit dcb5a27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('BookEffects', () => {
const completion = BooksApiActions.searchFailure({
errorMsg: 'Unexpected Error. Try again later.',
});
const error = 'Unexpected Error. Try again later.';
const error = { message: 'Unexpected Error. Try again later.' };

actions$ = hot('-a---', { a: action });
const response = cold('-#|', {}, error);
Expand Down
2 changes: 1 addition & 1 deletion projects/example-app/src/app/books/effects/book.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class BookEffects {
takeUntil(nextSearch$),
map((books: Book[]) => BooksApiActions.searchSuccess({ books })),
catchError(err =>
of(BooksApiActions.searchFailure({ errorMsg: err }))
of(BooksApiActions.searchFailure({ errorMsg: err.message }))
)
);
})
Expand Down

0 comments on commit dcb5a27

Please sign in to comment.