add more loggin

This commit is contained in:
Milo Schwartz 2024-11-24 13:50:22 -05:00
parent 9702e9c069
commit 0b49c84bb0
No known key found for this signature in database

View file

@ -5,6 +5,7 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io"
"net/http" "net/http"
) )
@ -137,6 +138,14 @@ func (p *Badger) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
return return
} }
bodyContent, err := io.ReadAll(resp.Body)
if err != nil {
http.Error(rw, "Internal Server Error", http.StatusInternalServerError)
return
}
fmt.Println("response body:", string(bodyContent))
fmt.Println("handling response") fmt.Println("handling response")
if result.RedirectURL != nil && *result.RedirectURL != "" { if result.RedirectURL != nil && *result.RedirectURL != "" {