mike1pol / drone-rocket

Drone plugin for sending message to Rocket.Chant channel using API.
4 stars 2 forks source link

Fix bad request error response because of missing json `content-type` #4

Closed joseluisq closed 3 years ago

joseluisq commented 3 years ago

This PR fixes a 400 Bad Request error response because of missing json Content-Type: application/json header.

Additionally it handles error requests, log them properly and signaling when that is the case.

2021/09/07 12:05:01 Rocket.Chat server error response
2021/09/07 12:05:01 Status: 400 Bad Request
2021/09/07 12:05:01 Body: {"success":false,"error":"[invalid-channel]","errorType":"invalid-channel"}
exit status 1

Resolves #2

joseluisq commented 3 years ago

Let me know when you publish the Docker image.

mike1pol commented 3 years ago

build & publish in docker hub