tzssangglass commented on a change in pull request #56:
URL:
https://github.com/apache/apisix-java-plugin-runner/pull/56#discussion_r680500336
##########
File path:
runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/HttpResponse.java
##########
@@ -194,6 +197,14 @@ private int buildStopResp(FlatBufferBuilder builder) {
Stop.startStop(builder);
if (!Objects.isNull(statusCode)) {
Stop.addStatus(builder, statusCode);
+ } else {
+ /**
+ * Avoid APISIX using 0 as the default HTTP Status Code
+ * {@link
org.apache.apisix.plugin.runner.HttpResponse#setStatusCode(int statusCode)}
+ * @see
https://github.com/apache/apisix-java-plugin-runner/issues/55
+ */
+ Stop.addStatus(builder, 500);
Review comment:
Not very suitable and can cause some ambiguity, do you have any
suggestions?
--
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]