Skip to content

Commit

Permalink
fix: additional error handling
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <rare-magma@posteo.eu>
  • Loading branch information
rare-magma committed Oct 6, 2024
1 parent 3e38987 commit a710195
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ func main() {
}
}

if len(payload.Bytes()) == 0 {
log.Fatalln("No data to send")
}
var buf bytes.Buffer
w := gzip.NewWriter(&buf)
w.Write(payload.Bytes())
Expand Down

0 comments on commit a710195

Please sign in to comment.