prevent call on nil when transaction was closed

Transaction can be closed from within the application (for example on Rack::Timeout error).
Then it tried to call `http_response_code` on nil.