add helper method for catching exceptions outside of rack