[AlibabaCloud] Change alicloud to alibabacloud (#470)

This commit is contained in:
muya-zj
2018-12-26 22:42:56 +08:00
committed by Brian Goff
commit e9e5c47037
21 changed files with 1891 additions and 0 deletions

26
errors.go Normal file
View File

@@ -0,0 +1,26 @@
package alibabacloud
import (
"net/http"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors"
"github.com/cpuguy83/strongerrors"
)
func wrapError(err error) error {
if err == nil {
return nil
}
se, ok := err.(*errors.ServerError)
if !ok {
return err
}
switch se.HttpStatus() {
case http.StatusNotFound:
return strongerrors.NotFound(err)
default:
return err
}
}