fix(cli): improve publish timeout and error handling#550
Open
MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
Open
fix(cli): improve publish timeout and error handling#550MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
Conversation
…aw#533) - Increase upload timeout from 15s to 120s for multipart form uploads (apiRequestForm and curl-based form upload). Regular API requests remain at 15s. - Improve timeout error message from bare "Timeout" to "Request timed out after Ns" so users know what happened. - Normalize non-Error throws (e.g. DOMException from AbortController across runtimes) into proper Error instances, preventing the misleading "Non-error was thrown" message from p-retry. - Preserve the original error as `cause` on the wrapped Error.
Contributor
|
@MunemHashmi is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Greptile SummaryImproves timeout handling for CLI publish operations by increasing the upload timeout from 15s to 120s for multipart form uploads. This prevents timeouts when publishing large skill bundles. Also enhances error messages to show actual timeout duration (
Confidence Score: 5/5
Last reviewed commit: 91c8ca7 |
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
Fixes #533
apiRequestForm+ curl form path) now use a 120s timeout instead of the default 15s. Regular API requests (search, whoami, etc.) remain at 15s."Timeout"to"Request timed out after Ns"so users can understand what happened and how long was waited.fetchWithTimeoutnow catches non-Error objects (e.g.DOMExceptionthrown byAbortController.abort()in some runtimes) and wraps them into properErrorinstances with{ cause }. This prevents the misleading"Non-error was thrown: \"Timeout\""message fromp-retry.Root cause
The publish command sends a multipart form upload via
apiRequestForm, which used the same 15sREQUEST_TIMEOUT_MSas simple GET requests. Large skill bundles easily exceed this. When theAbortControllerfires, some JS runtimes throw aDOMException(not anError), whichp-retrycan't handle and produces the confusing"Non-error was thrown"message.Test plan
bun run test— 605/605 pass (including 1 new test for non-Error normalization)bun run lint— 0 warnings, 0 errorsbun run build— successful