mirror of
https://github.com/idanoo/go-mastodon-matrix-webhooks.git
synced 2024-11-22 00:21:58 +00:00
Log errors
This commit is contained in:
parent
a94a89de96
commit
263bcf9250
4
main.go
4
main.go
@ -63,13 +63,11 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
||||
defer r.Body.Close()
|
||||
}
|
||||
|
||||
fmt.Printf("Headers: %+v\n", r.Header)
|
||||
|
||||
if len(bodyBytes) > 0 {
|
||||
var i IdentifyingRequest
|
||||
err := json.NewDecoder(r.Body).Decode(&i)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
log.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user