fix: enhance response handling in Mint adapter#803
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances response handling in the Tesla Mint adapter to fix issue #450 by improving the message pattern matching robustness and adding comprehensive test coverage.
- Added error handling patterns for HTTP/2 features and unknown response types
- Extended test coverage for various response scenarios including timeouts, streaming, and error conditions
- Improved forward compatibility by gracefully handling unsupported message types
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/tesla/adapter/mint.ex | Added pattern matching for error, pong, push_promise, and unknown message types |
| test/tesla/adapter/mint_test.exs | Added comprehensive test suite covering normal requests, errors, timeouts, streaming, and large responses |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@teamon could you give me a hand reviewing this one? |
40d9899 to
4cc6119
Compare
4cc6119 to
398a359
Compare
|
I am giving up how to properly test this, @teamon any clue 😭 |
398a359 to
0d2eb42
Compare
PR SummaryMedium Risk Overview Adds regression coverage for issue #450, including a small Cowboy TLS HTTP/2 server that emits a real push promise and tests for connection errors, timeouts, streaming, and the push-promise scenario. Reviewed by Cursor Bugbot for commit e4c3a1d. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0d2eb42. Configure here.
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
0d2eb42 to
e4c3a1d
Compare

fixes #450
Signed-off-by: Yordis Prieto yordis.prieto@gmail.com