Skip to content

Commit

Permalink
🚚 Rename constant
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnamurthypranesh committed May 11, 2022
1 parent 0798a8d commit 3d6fe2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions constants/errors.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package constants

const (
GenericError = "GenericError"
GenericPublishError = "GenericPublishError"
)

var ErrorStrings = map[string]string{
GenericError: "publish error",
GenericPublishError: "publish error",
}
2 changes: 1 addition & 1 deletion publisher/sns/sns.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (p *Publisher) PublishBatch(ctx context.Context, msgs []models.Message) (ma

for _, errEntry := range response.Failed {
if errEntry != nil && errEntry.Id != nil {
errMsg := "publish error"
errMsg := constants.GenericPublishError
if errEntry.Message != nil {
errMsg = *errEntry.Message
}
Expand Down

0 comments on commit 3d6fe2e

Please sign in to comment.