Uploaded image for project: 'BookBrainz'
  1. BookBrainz
  2. BB-635

Uncaught ElasticSearch error crashes the website

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      Looking at this error log from a contributor: https://pastebin.com/C0cFACJY

      An error occurred with ElasticSearch, which is one thing, but that error was not caught and crashed the container, which shouldn't happen.

      Following the log, the user hit the route /work/XXXXX/delete/handler, which calls handleDelete.
      That in itself tries to delete the entity from the ElasticSearch index here: https://github.com/bookbrainz/bookbrainz-site/blob/88ce6fe4a61cf755ff14f5ad764d48a8070976cf/src/server/routes/entity/entity.tsx#L472

      The error should be caught by this try-catch block, but apparently that's not what happened and needs investigating:
      https://github.com/bookbrainz/bookbrainz-site/blob/8a3c5d88c27684397b374763635115fb867d9b17/src/server/helpers/handler.js#L35-L38

            shubh Shubham
            mr_monkey Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package