yykaue opened a new pull request, #6929: URL: https://github.com/apache/shenyu/pull/6929
Fixes #6773. `AiResponseTransformerTemplate.assembleMessage()` previously called `value()` directly on the response status code. When the upstream response had no explicitly configured status code, `getStatusCode()` returned `null`, causing a `NullPointerException` and preventing response transformation. This PR: - Checks whether the response status code is present before accessing its value. - Omits the `response.status` field when no status has been explicitly set. - Preserves the existing behavior for responses with a configured status code. - Adds a regression test covering responses with an unset status code. ## Verification - The regression test reproduces the original `NullPointerException` before the fix. - The regression test passes after the fix. - Compilation and Checkstyle pass. @Aias00 Could you please review this PR? -- 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]
