Skip to content

Commit

Permalink
if we marshall and indent payload the it fails
Browse files Browse the repository at this point in the history
validation of payload content fails tbe

Signed-off-by: Chmouel Boudjnah <[email protected]>
  • Loading branch information
chmouel committed Apr 21, 2022
1 parent 88b7b67 commit 50f3a88
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gosmee.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ func (c goSmee) parse(data []byte) (payloadMsg, error) {
if err != nil {
return pm, err
}
pm.body, err = json.MarshalIndent(mb.Body, "", " ")
if err != nil {
return payloadMsg{}, nil
}
pm.body = mb.Body
}
if payloadKey == "content-type" {
if pv, ok := payloadValue.(string); ok {
Expand Down

0 comments on commit 50f3a88

Please sign in to comment.