Refactor #last_request and #last_response

use `nil or raise` convention to raise an exception.