add more logging to flareresolver request
All checks were successful
Build and publish the docker image / build (push) Successful in 57s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn 2025-05-02 17:10:24 +03:00
parent c9d498d1f4
commit a1b89e543c
Signed by: ngn
GPG Key ID: A3654DF5AD9F641D
2 changed files with 7 additions and 1 deletions

View File

@ -29,7 +29,7 @@ func main() {
if os.Getenv("DEV") != "true" {
gin.SetMode(gin.ReleaseMode)
fmt.Printf("Running in production mode. Listening on %s:%s.", host, port)
fmt.Println("Listening on %s:%s\n", host, port)
}
r := gin.Default()

View File

@ -1,6 +1,7 @@
package utils
import (
"fmt"
"net/http"
"net/url"
"os"
@ -55,6 +56,11 @@ func GET(target string) ([]byte, int, http.Header, error) {
return nil, 0, nil, err
}
if res.StatusCode() != 200 {
fmt.Printf("flareresolver request to %s failed: %d (%s)\n", target, res.StatusCode(), frurl)
return nil, 0, nil, fmt.Errorf("flareresolver failure")
}
response := res.Result().(*response)
headers := http.Header{}