Duansg opened a new pull request, #7989:
URL: https://github.com/apache/shenyu/pull/7989

   ## What
   `ModifyResponsePlugin` used `HttpStatus.valueOf(code)` to set the configured 
status. This method rejects any code without an enum constant, so a rule with
   `statusCode` 499 or 599 made every matching response throw
   `IllegalArgumentException: No matching constant for [499]`.
   
   Switched to `HttpStatusCode.valueOf(code)`, the same fix as fe6ab5b22 used 
for the httpclient plugin.
   
   ## Tests
   - Added `ModifyResponsePluginTest#testWriteWithNonStandardStatusCode`, which 
asserts the response status is 499.
   - I confirmed the new test fails without the fix and passes with it. All 14 
tests in `ModifyResponsePluginTest` pass, and checkstyle is clean.
   
   Make sure that:
   
   - [x] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [x] You submit test cases (unit or integration tests) that back your 
changes.
   - [x] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true`.
   


-- 
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]

Reply via email to