Making it possible to return response without exception when transaction is not accepted

I need to return response when a transaction is not accepted because I need some data from it. I make it so that it doesn't break existing behavior.