                           method: httpMethod,
                           parameters: parameters,
                           encoding: encoding,
-                          headers: headers).validate(statusCode: 200...299).responseJSON { rawResponse in
+                          headers: headers).validate(statusCode: AlamoNetworkManager.validStatusCodes).responseJSON { rawResponse in
                             //print response in DEBUG mode
                             #if DEBUG
                                 debugPrint(rawResponse)

                                    //return inmediatly
                                    success(response)
                                }
                            } else if let error = rawResponse.error as NSError? {
                                var reason = MSError.ResponseFailureReason.badRequest(code: error.code)
                                
                                if let statusCode = rawResponse.response?.statusCode
                                {
                                    //if the response has a 401 that means we have an authentication issue
                                    reason = MSError.ResponseFailureReason(code: statusCode)
                                }
                                failure(MSError.responseValidationFailed(reason: reason),
                                        self.errorResponse(fromData: rawResponse.data, request: rawResponse.request))
                            } else {
                                //if the request is succesful but has no response (validation for http code has passed also)
                                success([String:Any]())
                            }
        }
    }
    
    //MARK: - Pagination
    

                               method: method,
                               parameters: parameters,
                               encoding: encoding,
                               headers: headers).validate(statusCode: AlamoNetworkManager.validStatusCodes).responseJSON { rawResponse in
                                
                                if let response = rawResponse.value as? [String:Any],
                                    rawResponse.error == nil {
