Skip to content

fix: SocketException+HttpException mapped correctly while running natively#4993

Merged
auto-submit[bot] merged 7 commits into
mainfrom
mapHttpErrors
Mar 23, 2026
Merged

fix: SocketException+HttpException mapped correctly while running natively#4993
auto-submit[bot] merged 7 commits into
mainfrom
mapHttpErrors

Conversation

@jtmcdole
Copy link
Copy Markdown
Member

gae_server and local_server now use a BaseClient that catches the exception and return the cocoon_service ones.

gae_server and local_server now use a BaseClient that catches the exception and return the cocoon_service one.
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Hi @jtmcdole, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@jtmcdole jtmcdole added the CICD Run CI/CD label Mar 20, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

## 📋 Review Summary

This PR correctly implements MappingHttpClient to wrap http.Client requests and map dart:io SocketException and HttpException to their cocoon_service equivalents. This ensures backend operations remain platform-agnostic and robust.

🔍 General Feedback

  • The refactoring nicely encapsulates the error mapping logic within a custom HTTP client and injects it effectively throughout Config and the different backend entry points (gae_server, local_server).
  • The new unit tests cover the expected behavior well.
  • A couple of minor adjustments regarding error context preservation and object caching are recommended to further improve debugging capabilities and prevent redundant instantiations.

Comment thread packages/cocoon_integration_test/lib/src/fakes/fake_config.dart Outdated
Comment thread app_dart/lib/src/request_handling/http_io.dart
@jtmcdole jtmcdole added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 20, 2026
@jtmcdole jtmcdole requested a review from ievdokdm March 20, 2026 22:21
@jtmcdole jtmcdole added autosubmit Merge PR when tree becomes green via auto submit App. CICD Run CI/CD and removed CICD Run CI/CD labels Mar 20, 2026
Comment thread app_dart/lib/src/request_handling/http_io.dart Outdated
Comment thread app_dart/lib/src/request_handling/http_io.dart Outdated
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App. label Mar 21, 2026
@auto-submit
Copy link
Copy Markdown
Contributor

auto-submit Bot commented Mar 21, 2026

autosubmit label was removed for flutter/cocoon/4993, because This PR has not met approval requirements for merging. Changes were requested by {ievdokdm}, please make the needed changes and resubmit this PR.
The PR author is a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

this is the non-dart-io package
@jtmcdole jtmcdole added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 23, 2026
@jtmcdole jtmcdole requested a review from ievdokdm March 23, 2026 20:07
Copy link
Copy Markdown
Contributor

@ievdokdm ievdokdm left a comment

Choose a reason for hiding this comment

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

LGTM

@ievdokdm ievdokdm self-requested a review March 23, 2026 20:13
@jtmcdole jtmcdole requested a review from ievdokdm March 23, 2026 20:13
@jtmcdole jtmcdole added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App. and removed CICD Run CI/CD labels Mar 23, 2026
@auto-submit auto-submit Bot merged commit 39f906c into main Mar 23, 2026
25 checks passed
@jtmcdole jtmcdole deleted the mapHttpErrors branch April 16, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App. CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants