linrrzqqq opened a new pull request, #68247: URL: https://github.com/apache/doris/pull/68247
### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: When an AI provider returns a malformed embedding response, the adapter may call RapidJSON `Begin()`/`End()` on a non-array value. This triggers the `IsArray()` assertion in RapidJSON and crashes BE instead of returning an error. The same risk also exists when adapter parsers call `HasMember()` or `GetFloat()` without first validating the JSON value type. ### How is it fixed? Validate JSON types before parsing objects, arrays, and numbers. Malformed responses now return an error `Status` instead of triggering a RapidJSON assertion and crashing BE. Regression tests are added for all identified crash paths. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
