feat(functions)!: make FunctionException a sealed class - #1723
feat(functions)!: make FunctionException a sealed class#1723YadneshTeli wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough
ChangesFunctionException sealing
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR makes FunctionException sealed and documents the resulting breaking change while preserving the listed concrete failure types; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
Description
Makes
FunctionExceptionasealed classinpackages/functions_client/lib/src/types.dartso consumers can perform compile-time checked exhaustiveswitchexpressions over all Edge Function failure modes:FunctionsFetchException: Network/transport error before reaching the Edge Function.FunctionsApiException(formerlyFunctionsHttpException, renamed in refactor!: spell out abbreviations in the public API #1712): Edge Function returned a non-2xx status code.FunctionsRelayException: Error returned by the Supabase relay (x-relay-error).Example:
Breaking Changes
sealedimpliesabstract, which means:FunctionException(e.g. in tests/mocks) or subclass/implement it.FunctionsFetchException,FunctionsApiException,FunctionsRelayException).Documented in
MIGRATION.md.Verification
melos analyze: 0 issues across all 20 packagesmelos format: 0 files changedfunctions_client(51 tests) andsupabasetests all passCloses #1550