Include limit and bytes received in output_limit_exceeded errors - #125
Open
shrisukhani wants to merge 1 commit into
Open
shrisukhani wants to merge 1 commit into
shrisukhani wants to merge 1 commit into
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
output_limit_exceedederrors now report the configuredmaxOutputBytesand the number of bytes received. This brings the Node SDK in line with the matching python-sdk change.Changes
Command output exceeds maxOutputBytes (8 bytes received, limit 4); increase the collection limit or disconnect a detached processdetailsnow also includesmax_output_bytesandreceived_bytes, next to the existingprocess_idandlast_seq.ProcessOutput.failure()takes an optionaldetailsrecord. Thepython_reference.jsonfixtures still pass because they match details as a subset.Validation
npm run lint,npm run typecheckvitest run tests/unit/process-collection.test.ts tests/unit/python-reference.test.ts(254 passed), including a new test for the error message and detailsLink to Devin session: https://app.devin.ai/sessions/12e69524b921442f8ad62f908b07df87
Open in Devin Desktop: https://app.devin.ai/desktop/session/12e69524b921442f8ad62f908b07df87?variant=devin
Requested by: @shrisukhani
Note
Low Risk
Only enriches error messaging and metadata for an existing failure path; no change to collection logic or limits.
Overview
output_limit_exceedederrors now tell callers exactly how much output was collected versus the configured cap, matching the Python SDK behavior.When command output exceeds
maxOutputBytes, the error message includes received bytes and the limit, andHyperbrowserError.detailsaddsmax_output_bytesandreceived_bytesalongside the existingprocess_idandlast_seq.ProcessOutput.failure()accepts an optional extradetailsmap that is merged into those error details.A unit test asserts the new message text and detail fields when
exechits the limit.Reviewed by Cursor Bugbot for commit 304f916. Bugbot is set up for automated code reviews on this repo. Configure here.