Skip to content

Commit

Permalink
Return original error on reading parameter. (#124)
Browse files Browse the repository at this point in the history
[Fixes #104]
  • Loading branch information
jmcarp authored and nickatsegment committed Sep 4, 2018
1 parent 115e29b commit d76fdd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion store/ssmstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (s *SSMStore) readLatest(id SecretId) (Secret, error) {

resp, err := s.svc.GetParameters(getParametersInput)
if err != nil {
return Secret{}, ErrSecretNotFound
return Secret{}, err
}

if len(resp.Parameters) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion store/ssmstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (m *mockSSMClient) GetParameters(i *ssm.GetParametersInput) (*ssm.GetParame
if len(parameters) == 0 {
return &ssm.GetParametersOutput{
Parameters: parameters,
}, errors.New("parameters not found")
}, ErrSecretNotFound
}

return &ssm.GetParametersOutput{
Expand Down

0 comments on commit d76fdd1

Please sign in to comment.