handle kinds of error message
update test case and reduce duplicate code
This commit is contained in:
@@ -53,8 +53,6 @@ namespace AlibabaCloud
|
||||
JsonOutcome makeRequest(const std::string &endpoint, const CommonRequest &msg, HttpRequest::Method method = HttpRequest::Method::Get)const;
|
||||
using CoreClient::asyncExecute;
|
||||
private:
|
||||
std::string canonicalizedQuery(const std::map <std::string, std::string> ¶ms)const;
|
||||
std::string canonicalizedHeaders(const HttpMessage::HeaderCollection &headers)const;
|
||||
|
||||
std::shared_ptr<CredentialsProvider> credentialsProvider_;
|
||||
std::shared_ptr<Signer> signer_;
|
||||
|
||||
@@ -33,15 +33,18 @@ namespace AlibabaCloud
|
||||
std::string errorMessage() const;
|
||||
std::string host() const;
|
||||
std::string requestId() const;
|
||||
std::string detail() const;
|
||||
void setErrorCode(const std::string &code);
|
||||
void setErrorMessage(const std::string& message);
|
||||
void setHost(const std::string& host);
|
||||
void setRequestId(const std::string& request);
|
||||
void setDetail(const std::string& detail);
|
||||
private:
|
||||
std::string errorCode_;
|
||||
std::string message_;
|
||||
std::string host_;
|
||||
std::string requestId_;
|
||||
std::string detail_;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -44,9 +44,6 @@ namespace AlibabaCloud
|
||||
virtual HttpRequest buildHttpRequest(const std::string & endpoint, const ServiceRequest &msg, HttpRequest::Method method)const override;
|
||||
HttpRequest buildHttpRequest(const std::string & endpoint, const RoaServiceRequest &msg, HttpRequest::Method method)const;
|
||||
private:
|
||||
std::string canonicalizedHeaders(const HttpMessage::HeaderCollection &headers)const;
|
||||
std::string canonicalizedResource(const std::string &path, std::map <std::string, std::string> ¶ms)const;
|
||||
|
||||
std::shared_ptr<CredentialsProvider> credentialsProvider_;
|
||||
std::shared_ptr<Signer> signer_;
|
||||
};
|
||||
|
||||
@@ -53,8 +53,6 @@ namespace AlibabaCloud
|
||||
virtual HttpRequest buildHttpRequest(const std::string & endpoint, const ServiceRequest &msg, HttpRequest::Method method)const override;
|
||||
HttpRequest buildHttpRequest(const std::string & endpoint, const RpcServiceRequest &msg, HttpRequest::Method method)const;
|
||||
private:
|
||||
std::string canonicalizedQuery(const std::map <std::string, std::string> ¶ms)const;
|
||||
|
||||
std::shared_ptr<CredentialsProvider> credentialsProvider_;
|
||||
std::shared_ptr<Signer> signer_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user