feat: emit typed error envelopes for minutes and vc commands#1234
feat: emit typed error envelopes for minutes and vc commands#1234evandance wants to merge 1 commit into
Conversation
Failures from the minutes and video-conference commands now carry a stable error category and subtype instead of free-form text, so callers can tell apart invalid input, missing permissions, and network or service failures without scraping messages. Errors raised at the remote API boundary keep their current form until the typed request path is in place.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (51.42%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1234 +/- ##
==========================================
+ Coverage 69.20% 69.24% +0.03%
==========================================
Files 634 635 +1
Lines 59517 59700 +183
==========================================
+ Hits 41188 41337 +149
- Misses 15014 15035 +21
- Partials 3315 3328 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Migrate error handling in the
minutesandvc(video-conference) commanddomains from the legacy
output.Err*/output.Exit*/fmt.Errorfstyle totyped
errs.*errors. Failures now carry a stable category and subtype, socallers can reliably distinguish invalid input, missing permissions, and
network or service failures instead of scraping free-form text.
This is the first, mechanical part of the migration. Input/flag validation,
network/transport, local file I/O, and missing-scope failures are converted
now. Errors raised at the remote API boundary keep their current shape and are
marked with
TODO(errs-migrate)until the typed request path is available.Changes
shortcuts/minutes/:+upload,+update,+speaker-replace,+search, and+downloadreturn typed validation, network, and file-I/O errors; the sharedsave-error helper is replaced with a local typed mapping.
shortcuts/vc/:+meeting-join,+meeting-leave,+meeting-events,+search,+recording, and+notesreturn typed validation errors;+recordingaligns its missing-scope failure with the typed permission erroralready used by
+notes(carrying the missing scopes and identity).existing message checks.
precondition subtypes are left with
TODO(errs-migrate)markers for thefollow-up.
Test Plan
gofmt -l,go vet, andgo build ./...are clean.go test ./shortcuts/minutes/... ./shortcuts/vc/...passes, including the newtyped-error assertions.
message-substring tests pass unchanged.
Related Issues
Part of the typed-errors migration; follows the pattern established for the
drive domain in #1205.