medusa-project / book-tracker

Medusa Book Tracker
0 stars 0 forks source link

ActionController::Live::ClientDisconnected #42

Closed gaurijo closed 11 months ago

gaurijo commented 11 months ago

This PR addresses issue 41:

When a client exports book records in XML format and disconnects before the request can be completed, an error occurs and an email is sent to @adolski.

Changes:

In BooksController.index() a rescue block was added so that if the Client is disconnected, the error message will be saved to the logs. This should prevent the trigger that sends an email with the error.

I tested this in development by starting the Rails server, beginning the xml exportand then stopping the download before it could finish.

When doing so the expected message was displayed in my terminal, and no other errors were raised

Screenshot 2023-12-07 at 11 37 49 AM