Skip to content

Commit 8603fa3

Browse files
committed
Add debug logging for entries API response
1 parent 621152c commit 8603fa3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,11 @@ func fetchSubscriptionEntries(subscriptionID string) ([]SubscriptionEntry, error
681681
return nil, fmt.Errorf("entries for %s returned %d: %s", subscriptionID, resp.StatusCode, string(body))
682682
}
683683

684+
bodyBytes, _ := io.ReadAll(resp.Body)
685+
log.Printf("Entries API response for %s: %s", subscriptionID, string(bodyBytes))
686+
684687
var entries []SubscriptionEntry
685-
if err := json.NewDecoder(resp.Body).Decode(&entries); err != nil {
688+
if err := json.Unmarshal(bodyBytes, &entries); err != nil {
686689
return nil, fmt.Errorf("failed to decode entries for %s: %w", subscriptionID, err)
687690
}
688691

0 commit comments

Comments
 (0)