AssertionError: expected response to have status code 200 but got 500

In addition to that status code assertion error I also get few errors like,
FAIL Response Status Code is 200 | AssertionError: expected response to have status code 200 but got 500
FAIL Response to include Deal Type | AssertionError: expected ‘’ to include ‘Deal Type’
FAIL Response to include Indexed On | AssertionError: expected ‘’ to include ‘Indexed On’
FAIL Response to include Commodity | AssertionError: expected ‘’ to include ‘Commodity’

And it also says 500 internal server error.

@ashsys Welcome to the community :partying_face:

Because your assertion expects a 200 status and with the successful response message back from server three key’s : Deal Type, Indexed On, Commodity. since it’s getting 500 internal server error the status code assertion is failing, and the renaming assertions are failing since the expected key’s are not returned in the response. Most of the cases 500 Internal Server Error is something up to the server unavailability. If it’s internal API please check with the developer if the server is up :blush::+1:t2:

1 Like