Hitting Library page before initial import throws cryptic error #48

Closed
opened 2022-12-29 20:55:17 +00:00 by rishighan · 0 comments
rishighan commented 2022-12-29 20:55:17 +00:00 (Migrated from github.com)

If the user hasn't performed the initial import, and traverses to the Library page, the page crashes with the following error:

TypeError undefined is not an object (evaluating 'searchResults.hits')

This is because the import hasn't been performed, and the Elasticsearch index (which the error directly refers to) doesn't exist.

The fix for this is to simply wrap the <Library /> component with an <ErrorBoundary /> and handle the error in the UI.

If the user hasn't performed the initial import, and traverses to the `Library` page, the page crashes with the following error: `TypeError undefined is not an object (evaluating 'searchResults.hits')` This is because the import hasn't been performed, and the Elasticsearch index (which the error directly refers to) doesn't exist. The fix for this is to simply wrap the `<Library />` component with an `<ErrorBoundary />` and handle the error in the UI.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: frishi/threetwo#48