mirror of
https://gh-proxy.org/https://github.com/klinsmaya/new-api.git
synced 2026-11-08 01:17:09 +08:00
The submit relay treated every status other than 200 as an upstream failure, so a task API that answers 201 Created or 202 Accepted (for example Tencent's wand-vega-video-1.0-lite) returned fail_to_fetch_task and parseSubmitResponse never ran. The check predates the plugin system, when every built-in adaptor answered 200; the plugin adaptor already passes the exact statusCode to parseSubmitResponse and polling has always classified 2xx as a successful response. Accept any 2xx before parsing and keep failing other statuses with the upstream status and body. Add a relay regression that drives a plugin submission against a real upstream returning 200/201/202 and 400/502, and document the submit-side 2xx contract in the plugin API. Fixes #7478