Skip to content

Add RemoteError getters and extensions#9

Merged
greymag merged 6 commits into
masterfrom
add-getters
Apr 28, 2026
Merged

Add RemoteError getters and extensions#9
greymag merged 6 commits into
masterfrom
add-getters

Conversation

@Vabiel
Copy link
Copy Markdown
Contributor

@Vabiel Vabiel commented Apr 26, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.7 and add a 0.4.7 changelog entry.
  • Add isMaintenanceError and shouldSuppressLogging getters to RemoteError extensions.
  • Add corresponding isMaintenanceError and shouldSuppressLogging getters to ErrorResult? 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.

Comment thread lib/src/remote_error_extension.dart Outdated
Comment thread lib/src/error_result_extension.dart Outdated
Comment thread lib/src/remote_error_extension.dart Outdated
Comment thread lib/src/error_result_extension.dart Outdated
Comment thread lib/src/remote_error_extension.dart Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 isMaintenanceError getter for GlobalErrorCode.maintenanceError.
  • Updated isTemporaryServerError to 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.

Comment thread CHANGELOG.md Outdated
Comment thread lib/src/error_result_extension.dart Outdated
greymag and others added 2 commits April 28, 2026 08:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI requested a review from greymag April 28, 2026 06:16
@greymag greymag merged commit a77b8a0 into master Apr 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants