Skip to content

fix: classify Go SDK response body timeouts - #18362

Open
Hanabi9248 wants to merge 2 commits into
PaddlePaddle:mainfrom
Hanabi9248:codex/go-response-timeout
Open

Hanabi9248 wants to merge 2 commits into
PaddlePaddle:mainfrom
Hanabi9248:codex/go-response-timeout

Conversation

@Hanabi9248

Copy link
Copy Markdown

When an API server sends HTTP headers and then stalls while sending JSON, SubmitOCR and GetStatus return ResponseFormatError even though the request timed out. Callers checking for RequestTimeoutError miss this case.

Recognize timeout errors from the JSON decoder and preserve the underlying cause. Malformed JSON still returns ResponseFormatError.

Added local HTTP-server tests for delayed and malformed bodies through both public methods. The two timeout cases fail before the change. go test ./... and go vet ./... pass for the Go SDK.

Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
@Hanabi9248

Copy link
Copy Markdown
Author

Updated the contribution branch with current main using a normal merge; the new head is cb331aa4bcd734aa4d6c6b3c45cba39b8780e41e and the original fix commit is preserved. The Go SDK directory has the same 17 file/tree entries and blob identities as the previously validated revision, including the timeout fix and regression test, so the existing focused go test ./... and go vet ./... evidence is reused; this is not a new full-repository test result. The fresh PR Tests, GPU Tests and Code Style workflows for this head are now action_required. Could a project member authorize the appropriate checks and review the response-body timeout classification when convenient?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant