You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by "JedrekWang (via GitHub)" <gi...@apache.org> on 2024/12/05 12:46:27 UTC
[I] servicecomb提供的异常拦截器ExceptionToProducerResponseConverter不能拦截 Handler,HttpServerFilter 等抛出的异常 [servicecomb-java-chassis]
JedrekWang opened a new issue, #4634:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4634
#### 背景
当业务定制的filter或者servicecomb自带的filter出现异常时,想要根据对应的异常类型或异常新信息来记录日志或告警
#### 分析
查看servicecomb源码,发现ExceptionToProducerResponseConverter只能在业务执行业务逻辑阶段抛出异常才会捕获, Handler,HttpServerFilter 等抛出的异常当前没有通用的拦截机制
#### 诉求
能够针对Handler,HttpServerFilter 等抛出的异常也提供类似异常捕获器的能力
--
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: commits-unsubscribe@servicecomb.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] servicecomb提供的异常拦截器ExceptionToProducerResponseConverter不能拦截 Handler,HttpServerFilter 等抛出的异常 [servicecomb-java-chassis]
Posted by "JedrekWang (via GitHub)" <gi...@apache.org>.
JedrekWang commented on issue #4634:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4634#issuecomment-2521892486
业务自己扩展的handler和filter可以通过内部异常捕获来处理,但是servicecomb自带的handler和HttpServerFilter没办法去定制捕获异常的逻辑
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] servicecomb提供的异常拦截器ExceptionToProducerResponseConverter不能拦截 Handler,HttpServerFilter 等抛出的异常 [servicecomb-java-chassis]
Posted by "JedrekWang (via GitHub)" <gi...@apache.org>.
JedrekWang commented on issue #4634:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4634#issuecomment-2535326926
比如说,ServerRestArgsFilter这个filter在校验接口入参的时候抛的异常信息,`Parameter is not valid for operation [%s]. Parameter is [%s]. Processor is [%s]. Message is [%s].`
业务想要对接口入参类型的异常进行告警
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] servicecomb提供的异常拦截器ExceptionToProducerResponseConverter不能拦截 Handler,HttpServerFilter 等抛出的异常 [servicecomb-java-chassis]
Posted by "liubao68 (via GitHub)" <gi...@apache.org>.
liubao68 commented on issue #4634:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4634#issuecomment-2530020740
你能提供下servicecomb自带的handler和HttpServerFilter抛出的具体异常吗? 看下是什么场景。
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] servicecomb提供的异常拦截器ExceptionToProducerResponseConverter不能拦截 Handler,HttpServerFilter 等抛出的异常 [servicecomb-java-chassis]
Posted by "liubao68 (via GitHub)" <gi...@apache.org>.
liubao68 commented on issue #4634:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4634#issuecomment-2520313087
2.x目前这个异常处理就是不包括Handler和HttpServerFilter异常的。 如果你有特殊情况, 可以考虑增加异常处理的Handler或者HttpServerFilter
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org