-
Notifications
You must be signed in to change notification settings - Fork 68
Improve error handling for HTTP status code 0 errors #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
The CI failure in pkg/erc4337/preset appears to be unrelated to our changes in the taskengine components. The error is 'paymaster deposit too low' which is not connected to our HTTP error handling improvements. Can we re-run the CI checks? |
The CI failure in pkg/erc4337/preset is unrelated to our HTTP error handling changes. The core/taskengine test was canceled only because of this unrelated test failure, not because of any issues with our changes. Could we get a re-run of the CI checks? |
The test looks correct but failed due to the below errors
|
35ae4a8
to
82ce8bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @v9n, I reverted the previous change and updated core/taskengine/vm_runner_rest.go. Please check out my two comments below again.
@@ -78,6 +78,7 @@ func (r *RestProcessor) Execute(stepID string, node *avsproto.RestAPINode) (*avs | |||
} | |||
|
|||
var err error | |||
// The defer function serves as the single source of truth for setting Success: false | |||
defer func() { | |||
s.EndAt = time.Now().UnixMilli() | |||
s.Success = err == nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The s.Success set is solely depending on the err
value here now.
BlockHash: txReceipt.BlockHash.Hex(), | ||
BlockNumber: uint64(txReceipt.BlockNumber.Int64()), | ||
From: from.Hex(), | ||
To: tx.To().Hex(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These missing fields are updated, and verified in TestContractWriteSimpleReturn
that they are set.
Co-Authored-By: Chris Li <chris@avaprotocol.org>
* Fix code formatting with gofmt Co-Authored-By: Chris Li <chris@avaprotocol.org> * Fix nil pointer dereference in ContractWriteProcessor.Execute Co-Authored-By: Chris Li <chris@avaprotocol.org> * Revert changes to vm_runner_contract_write.go to wait for PR #199 Co-Authored-By: Chris Li <chris@avaprotocol.org> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Chris Li <chris@avaprotocol.org>
Co-Authored-By: Chris Li <chris@avaprotocol.org>
…ation Co-Authored-By: Chris Li <chris@avaprotocol.org>
Co-Authored-By: Chris Li <chris@avaprotocol.org>
…t their existence.
1ea5d94
to
1ada19c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.
* Fix code formatting with gofmt Co-Authored-By: Chris Li <chris@avaprotocol.org> * Fix nil pointer dereference in ContractWriteProcessor.Execute Co-Authored-By: Chris Li <chris@avaprotocol.org> * Revert changes to vm_runner_contract_write.go to wait for PR #199 Co-Authored-By: Chris Li <chris@avaprotocol.org> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Chris Li <chris@avaprotocol.org>
* Improve error handling for HTTP status code 0 errors Co-Authored-By: Chris Li <chris@avaprotocol.org> * Add unit test for HTTP error handling and fix error message capitalization Co-Authored-By: Chris Li <chris@avaprotocol.org> * Fix unused import in vm_runner_rest_test.go Co-Authored-By: Chris Li <chris@avaprotocol.org> * Updated the testing instructions in README.md * Fixed test errors from TestRestRequestErrorHandling * Added Paymaster contract address to docs/contract.md * Added fixes for TestContractWriteSimpleReturn case * Updated error message in operator/operator.go * Added missing txReceipt fields to vm_runner_contract_write.go and test their existence. * Updated vm_runner_rest.go to handle status 0 * Revert the capitalization of Errorf messages --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Chris Li <chris@avaprotocol.org> Co-authored-by: chrisli30 <chrisli30@users.noreply.github.com>
This PR improves error handling for HTTP status code 0 errors during task execution, providing clearer error messages that indicate connection failures, timeouts, or DNS resolution issues.
Link to Devin run: https://app.devin.ai/sessions/1679cf09102c4f4a817ef99d148b7fae
Requested by: Chris Li (chris@avaprotocol.org)