On the middleware level catch an exception from Rails app and store in the separated Redis database.
Andrii Rudenko
MIT