mirror of
https://github.com/idanoo/go-mastodon-matrix-webhooks
synced 2025-07-01 11:02:14 +00:00
Log errors
This commit is contained in:
parent
a94a89de96
commit
263bcf9250
1 changed files with 1 additions and 3 deletions
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…
Add table
Add a link
Reference in a new issue