Skip to content

Commit

Permalink
fix(errors): Allow Errors nil in KmsErrors (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldesauw authored Jan 20, 2025
1 parent 935de89 commit 1451c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ type KmsError struct {

func NewKmsErrorFromBytes(sbody []byte) *KmsError {
var errResp types.ErrorResponse
if e := json.Unmarshal(sbody, &errResp); e == nil && errResp.Errors != nil {
if e := json.Unmarshal(sbody, &errResp); e == nil {
return newKmsErrorFromRestResponse(errResp)
}
return nil
Expand Down

0 comments on commit 1451c28

Please sign in to comment.