added statusCode when response is ok
replaced errorCode by statusCode when response is nok