Added test for 404 and 500 and json format
Added test for:
* a request with 404 status code
* a request with 500 status code, mocking a ConnectionError even if it should be a response with status code 200
* check if the response of the error is in JSON format