Skip to content

Commit

Permalink
handle errors on suite endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammjammjamm committed Apr 15, 2024
1 parent cee86ce commit d243d70
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/inferno/dsl/suite_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def initialize(config: self.class.config) # rubocop:disable Lint/MissingSuper
#
# @example
# request.params # Get url/query params
# request.body # Get body
# request.headers['accept'] # Get Accept header
# request.body.read # Get body
# request.headers['accept'] # Get Accept header
def request
req
end
Expand Down Expand Up @@ -255,13 +255,17 @@ def handle(req, res)
@res = res
test_run

make_response

persist_request if persist_request?

update_result

resume if resume_test_run?

make_response
rescue StandardError => e
halt 500, e.full_message
ensure
request.body&.rewind
end
end
end
Expand Down

0 comments on commit d243d70

Please sign in to comment.