You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/05/12 02:47:33 UTC

[GitHub] [skywalking] zhangsaizz opened a new issue #6928: Spring RestTemplate plugin IllegalArgumentException

zhangsaizz opened a new issue #6928:
URL: https://github.com/apache/skywalking/issues/6928


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [x] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Bug
   - Which version of SkyWalking, OS, and JRE?
      8.5.0
   - Which company or project?
      apm-resttemplate-4.3.x-plugin
   - What happened?
      exception :
   ![image](https://user-images.githubusercontent.com/9312086/117909903-9e7ef800-b30d-11eb-9aec-7e5b78b14592.png)
   
   When class extends  `AbstractClientHttpResponse` , funciton `getStatusCode()` will check whether the status code exists in the http status code table, if not, an exception will be thrown
   
   


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

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



[GitHub] [skywalking] wu-sheng closed issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #6928:
URL: https://github.com/apache/skywalking/issues/6928


   


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

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



[GitHub] [skywalking] wu-sheng commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-842274712


   No update


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

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



[GitHub] [skywalking] zhangsaizz commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
zhangsaizz commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839517454


   > Status code has very specific definition in HTTP spec. This is why I am confused. Custom response code is not negative value.
   
   Okay, I also think that the custom status code should not have negative numbers. But now whether the scene is negative or positive, it will report an error if it is not the originally designed status code range, and the user will not be able to use the custom status code.


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

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



[GitHub] [skywalking] zhangsaizz commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
zhangsaizz commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839672466


   
   
   
   > I haven't read source codes, but if it is, it looks like rest template design, we are just using it. Otherwise, what we can do? Catching the exception and say unknown response code will cause more confused, and our users will ask again about why again.
   > What do you propose?
   
   Can I directly use method `getRawStatusCode()` to get the status? This way there will be no verification exceptions .
   


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

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



[GitHub] [skywalking] wu-sheng commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839675502


   But code is the only way to determine right or wrong status efficiently. Without that, successful rate is not accurate, or costs too many backend resources.


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

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



[GitHub] [skywalking] wu-sheng commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-842274712


   No update


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

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



[GitHub] [skywalking] wu-sheng commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839525013


   I haven't read source codes, but if it is, it looks like rest template design, we are just using it. Otherwise, what we can do? Catching the exception and say unknown response code will cause more confused, and our users will ask again about why again.
   What do you propose?


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

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



[GitHub] [skywalking] zhangsaizz commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
zhangsaizz commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-840363534


   > But code is the only way to determine right or wrong status efficiently. Without that, successful rate is not accurate, or costs too many backend resources.
   
   Can the status of right and wrong be left to the user to define? The default logic is the current one. Adding a custom status code judgment table can give users right and wrong configuration options, whether it can be more flexible


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

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



[GitHub] [skywalking] zhangsaizz commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
zhangsaizz commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839416859


   > One question, why your REST response code isn't an integer?
   
   It should be that our gateway has customized an http code to return -1, but why is it not an integer, we are still checking it internally. Back to the question, do we need to consider the scenario of custom status codes?


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

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



[GitHub] [skywalking] zhangsaizz commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
zhangsaizz commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839416392


   It should be that our gateway has customized an http code to return -1, but why is it not an integer, we are still checking it internally. Back to the question, do we need to consider the scenario of custom status codes? 


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

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



[GitHub] [skywalking] wu-sheng commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839525526


   Look at the exception stack, it is caused by spring framework API.


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

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



[GitHub] [skywalking] wu-sheng closed issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #6928:
URL: https://github.com/apache/skywalking/issues/6928


   


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

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



[GitHub] [skywalking] wu-sheng commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839393889


   One question, why your REST response code isn't  an integer?


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

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



[GitHub] [skywalking] wu-sheng commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-840373558


   What do you mean by user definition? This code is in the agent. 100% transparent to the end user.


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

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



[GitHub] [skywalking] wu-sheng commented on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839417309


   Status code has very specific definition in HTTP spec. This is why I am confused. Custom response code is not negative value.


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

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



[GitHub] [skywalking] zhangsaizz removed a comment on issue #6928: Spring RestTemplate plugin IllegalArgumentException

Posted by GitBox <gi...@apache.org>.
zhangsaizz removed a comment on issue #6928:
URL: https://github.com/apache/skywalking/issues/6928#issuecomment-839416392


   It should be that our gateway has customized an http code to return -1, but why is it not an integer, we are still checking it internally. Back to the question, do we need to consider the scenario of custom status codes? 


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

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