fix(cloud): surface real backend errors from pmg cloud sync (#365)

* fix(cloud): surface real backend errors from pmg cloud sync

runSync wrapped every DrainToCloud failure as a network error, masking
the actual cause — an entitlement failure surfaced as "check your
network connectivity", which made backend issues very hard to diagnose.

Classify the error first (usefulerror gRPC converters map backend
statuses to authentication, entitlement, quota and server errors) and
pass it through. The network-flavored message remains only as the
fallback when nothing can classify the error. Bump safedep/dry to pick
up nested-Any ErrorInfo extraction so entitlement classification also
works against control-tower versions that re-wrap status details.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MHdvpFXb2shyMzUDyR8QKA

* chore: bump safedep/dry to latest branch commit

Picks up the review follow-up in dry#128 (skip unmarshalling unknown
detail types when unwrapping Any).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MHdvpFXb2shyMzUDyR8QKA

* chore: bump safedep/dry to post-merge main

Replaces the dry#128 branch pseudo-version with the squashed main
commit now that the nested-Any ErrorInfo fix has merged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MHdvpFXb2shyMzUDyR8QKA

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Abhisek Datta
2026-07-10 15:19:09 +05:30
committed by GitHub
co-authored by Claude Fable 5
parent 2d938ea381
commit 2f1c348a06
4 changed files with 145 additions and 13 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ require (
github.com/landlock-lsm/go-landlock v0.7.0
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
github.com/posthog/posthog-go v1.5.12
github.com/safedep/dry v0.0.0-20260620130340-2af76e505537
github.com/safedep/dry v0.0.0-20260710090004-346776184be5
github.com/safedep/ptyx v0.2.1-0.20260529140457-d1f745842a6a
github.com/sony/gobreaker/v2 v2.4.0
github.com/spf13/cobra v1.9.1