diff --git a/vngcloud/sdk_error/isdk_error.go b/vngcloud/sdk_error/isdk_error.go index c6ef74a..f6e9f62 100644 --- a/vngcloud/sdk_error/isdk_error.go +++ b/vngcloud/sdk_error/isdk_error.go @@ -13,6 +13,7 @@ type IError interface { GetError() error GetMessage() string GetErrorCode() ErrorCode + GetStringErrorCode() string GetParameters() map[string]interface{} GetErrorMessages() string GetListParameters() []interface{} diff --git a/vngcloud/sdk_error/sdk_error.go b/vngcloud/sdk_error/sdk_error.go index dd55f87..834666f 100644 --- a/vngcloud/sdk_error/sdk_error.go +++ b/vngcloud/sdk_error/sdk_error.go @@ -108,6 +108,10 @@ func (s *SdkError) GetErrorCode() ErrorCode { return s.errorCode } +func (s *SdkError) GetStringErrorCode() string { + return string(s.errorCode) +} + func (s *SdkError) GetParameters() map[string]interface{} { return s.parameters }