You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/06/23 10:53:00 UTC

[GitHub] [trafficserver] brbzull0 opened a new pull request, #8923: JSONRPC: Deal with an empty id as it is an error.

brbzull0 opened a new pull request, #8923:
URL: https://github.com/apache/trafficserver/pull/8923

   Using an empty `""` id is discouraged as it lost the meaning of having an id, so now we mark this as an error and inform the caller about it.
   
   ```json
   {
      "id":"",
      "jsonrpc":"2.0",
      "method":"will_not_pass_the_validation"
   }
   ```
   Response
   ```json
   {
      "jsonrpc":"2.0",
      "error":{
         "code":11,
         "message":"Use of an empty string as id is discouraged"
      }
   }
   ``` 
   Beside this, docs are also updated to reflect this and  there are some small fixes around documentation.


-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] brbzull0 merged pull request #8923: JSONRPC: Deal with an empty id as an id error.

Posted by GitBox <gi...@apache.org>.
brbzull0 merged PR #8923:
URL: https://github.com/apache/trafficserver/pull/8923


-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] SolidWallOfCode commented on a diff in pull request #8923: JSONRPC: Deal with an empty id as an id error.

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on code in PR #8923:
URL: https://github.com/apache/trafficserver/pull/8923#discussion_r907882559


##########
doc/developer-guide/jsonrpc/jsonrpc-node-errors.en.rst:
##########
@@ -112,6 +112,8 @@ Field           Message                                   Description
 10              Unauthorized action                       The rpc method will not be invoked because the action is not
                                                           permitted by some constraint or authorization issue.Check
                                                           :ref:`jsonrpc-node-errors-unauthorized-action` for mode details.
+11              Use of an empty string as id is           An empty string "" as an id will not be accepted by the server.
+                discouraged

Review Comment:
   "discouraged" seems like weak tea if it's outright rejected.



-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org