Add RemoteError getters and extensions#9
Conversation
There was a problem hiding this comment.
Pull request overview
This PR bumps the package version and extends the RemoteError / ErrorResult extension APIs with convenience getters for detecting maintenance-mode errors and deciding whether logging should be suppressed.
Changes:
- Bump package version to
0.4.7and add a0.4.7changelog entry. - Add
isMaintenanceErrorandshouldSuppressLogginggetters toRemoteErrorextensions. - Add corresponding
isMaintenanceErrorandshouldSuppressLogginggetters toErrorResult?extensions.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pubspec.yaml | Version bump to 0.4.7. |
| lib/src/remote_error_extension.dart | Adds maintenance detection + logging suppression getter on RemoteError. |
| lib/src/error_result_extension.dart | Exposes the same getters on ErrorResult? via toError(). |
| CHANGELOG.md | Documents the new getters in 0.4.7. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds new convenience getters on ErrorResult extensions to better classify maintenance and temporary server-side failures, plus updates tests and documentation for the new behavior.
Changes:
- Added
isMaintenanceErrorgetter forGlobalErrorCode.maintenanceError. - Updated
isTemporaryServerErrorto treat maintenance as temporary and to exclude HTTP 502 from the “temporary” status list. - Added/updated unit tests and bumped package version + changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/error_result_extension_test.dart | Adds coverage for isMaintenanceError and updated isTemporaryServerError semantics. |
| lib/src/error_result_extension.dart | Implements isMaintenanceError and updates isTemporaryServerError / temporary status list. |
| pubspec.yaml | Bumps package version to 0.4.7. |
| CHANGELOG.md | Documents the new getter and the updated temporary-server classification behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Innim/flutter_remote_error/sessions/7776935b-ad64-4475-ad47-9c6feb1993b7 Co-authored-by: greymag <1502131+greymag@users.noreply.github.com>
No description provided.