log-file #166

Merged
carlos merged 6 commits from log-file into http-logs 2024-11-08 08:09:16 +01:00
Showing only changes of commit dcd8fce59a - Show all commits

View File

@ -96,9 +96,9 @@ func (as *AccountService) CreateAccount(ctx context.Context) (*models.AccountRes
if err != nil { if err != nil {
return nil, err return nil, err
} }
_, err = doCustodialRequest(ctx, req, &r) _, err = doCustodialRequest(ctx, req, &r)
if err != nil { if err != nil {
log.Printf("Failed to make custodial %s request to endpoint: %s with reason: %s", req.Method, req.URL, err.Error())
return nil, err return nil, err
} }
@ -176,7 +176,6 @@ func (as *AccountService) VoucherData(ctx context.Context, address string) (*mod
func doRequest(ctx context.Context, req *http.Request, rcpt any) (*api.OKResponse, error) { func doRequest(ctx context.Context, req *http.Request, rcpt any) (*api.OKResponse, error) {
var okResponse api.OKResponse var okResponse api.OKResponse
var errResponse api.ErrResponse var errResponse api.ErrResponse
req.Header.Set("Content-Type", "application/json") req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req) resp, err := http.DefaultClient.Do(req)
if err != nil { if err != nil {