Skip to content

Commit

Permalink
Merge pull request #2374 from jy19/update_err_msg
Browse files Browse the repository at this point in the history
update ASM error message to be more clear
  • Loading branch information
jy19 authored Feb 24, 2020
2 parents 6c95046 + 20d0e0f commit 1fecdfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion agent/taskresource/asmsecret/asmsecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func getASMParametersFromInput(valueFrom string) (input *secretsmanager.GetSecre
}
if len(paramValues) != len(strings.Split(asmARNResourceWithParametersFormat, arnDelimiter)) {
// can't tell what input this is, throw some error
err = errors.New("unexpected ARN format with parameters when trying to retrieve ASM secret")
err = errors.New("an invalid ARN format for the AWS Secrets Manager secret was specified. Specify a valid ARN and try again.")
return nil, "", err
}

Expand Down
2 changes: 1 addition & 1 deletion agent/taskresource/asmsecret/asmsecret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func TestCreateWithASMParametersWrongFormat(t *testing.T) {

assert.Error(t, asmRes.Create())
expectedError := fmt.Sprintf("trying to retrieve secret with value %s resulted in error: "+
"unexpected ARN format with parameters when trying to retrieve ASM secret", valueFromWrongFormat)
"an invalid ARN format for the AWS Secrets Manager secret was specified. Specify a valid ARN and try again.", valueFromWrongFormat)
assert.Contains(t, asmRes.GetTerminalReason(), expectedError)
}

Expand Down

0 comments on commit 1fecdfb

Please sign in to comment.