added log line
Some checks failed
Go Tests / go-tests (push) Failing after 1m5s

This commit is contained in:
Manuel Ganter 2025-09-05 16:11:35 +02:00
parent 278073d7ab
commit ec1abae2d6
No known key found for this signature in database

View file

@ -246,12 +246,14 @@ func (e *EdgeConnect) DeleteAppInstance(ctx context.Context, appinstancekey AppI
}
func call[T any](ctx context.Context, client *EdgeConnect, path string, body []byte) (Responses[T], error) {
log.Printf("call(): trying %s\n", path)
token, err := client.RetrieveToken(ctx)
if err != nil {
return Responses[T]{}, err
}
request, err := http.NewRequestWithContext(ctx, "POST", path, bytes.NewBuffer(body))
request, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("%s/%s", client.BaseURL, path), bytes.NewBuffer(body))
if err != nil {
return Responses[T]{}, err
}
@ -278,7 +280,7 @@ func call[T any](ctx context.Context, client *EdgeConnect, path string, body []b
responses.Responses = append(responses.Responses, d)
}
log.Printf("call: %s resulting in %v and %v messages", path, resp.StatusCode, len(responses.Responses))
log.Printf("call(): %s resulting in %v and %v messages\n", path, resp.StatusCode, len(responses.Responses))
return responses, nil
}