Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

阿里云 #26

Open
tf-boy opened this issue Jul 22, 2019 · 1 comment
Open

阿里云 #26

tf-boy opened this issue Jul 22, 2019 · 1 comment

Comments

@tf-boy
Copy link

tf-boy commented Jul 22, 2019

var code = response.statusCode;
if (code < 200 || code >= 300) {
var message = response.headers['x-ca-error-message'] || '';
var err = new Error(${method} ${format(url)} failed width code(${code}). +
request id: ${response.headers['x-ca-request-id']}, +
error message: ${message});
if (debug.enabled) {
debug('stringToSign:');
debug('client: %s', stringToSign.replace(/\n/g, '#'));
if (message.includes('Invalid Signature')) {
var serverStringToSign = message.replace('Invalid Signature, Server StringToSign:', '');
debug('server: %s', serverStringToSign);
}
}
err.code = code;
err.data = {
headers: response.headers
};
throw err;
}
这里是否可以将服务器555状态码 进行忽略 因为阿里云接口好些都是 调用成功的状态 却返回555状态码

@JacksonTian
Copy link
Contributor

有实际例子吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants