         request.responseData { response in
             switch response.result {
             case .success(let data):
-                switch self.dataToError(data: data) {
+                switch self.responseToError(response: response.response, data: data) {
                 case .some(let error): failure?(error)
                 case .none: success?()
                 }

        )
        
        // execute REST request
        request.responseObject(dataToError: dataToError) {
            (response: RestResponse<Collection>) in
            switch response.result {
            case .success(let collection): success(collection)

        )
        
        // execute REST request
        request.responseObject(responseToError: responseToError) {
            (response: RestResponse<Collection>) in
            switch response.result {
            case .success(let collection): success(collection)
