added checking of statusCode to request-promise