Skip to content

Commit eb5c69e

Browse files
committed
making consistent in error types usage
1 parent d8acbaf commit eb5c69e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/cloud/services/ssm/secret_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ func (e *mockAPIError) ErrorCode() string {
5252
return e.Code
5353
}
5454

55-
// ErrorMessage returns the error's message.
56-
func (e *mockAPIError) ErrorMessage() string {
55+
// Error returns the error's message, satisfying the standard 'error' interface.
56+
func (e *mockAPIError) Error() string {
5757
return e.Message
5858
}
5959

6060
// Error returns the error's message, satisfying the standard 'error' interface.
61-
func (e *mockAPIError) Error() string {
61+
func (e *mockAPIError) ErrorMessage() string {
6262
return e.Message
6363
}
6464

@@ -67,6 +67,9 @@ func (e *mockAPIError) ErrorFault() smithy.ErrorFault {
6767
// smithy.FaultClient is a good default for most simulated errors.
6868
return smithy.FaultClient
6969
}
70+
71+
var _ smithy.APIError = (*mockAPIError)(nil)
72+
7073
func TestServiceCreate(t *testing.T) {
7174
mockCtrl := gomock.NewController(t)
7275
defer mockCtrl.Finish()

0 commit comments

Comments
 (0)