Hitting Library page before initial import throws cryptic error #48
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If the user hasn't performed the initial import, and traverses to the
Librarypage, 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.