Если HTTP-исходящий шлюз вызывает HTTPstatuscodeexception ... он будет пузыриться до того места, где я вызываю метод шлюза. Я не могу показаться, чтобы поймать исключение тамhttp outbound gateway httpstatuscodeexception
У меня есть ниже CONFIG
<int:channel id="responseChannel" />
<int:gateway id="someGateway" service-interface="someinterface" default-request-channel="requestChannel" default-reply-channel="responseChannel" default-reply-timeout="${reply.timeout}">
<int:method name ="somemethod">
</int:gateway>
<int:chain id="some-gateway-chain" input-channel="requestChannel" output- channel="responseChannel">
<int:object-to-json-transformer />
<int-http:outbound-gateway url-expression="some url" http-method="POST" expected-response-type-expression="some.RESPONSE_TYPE" request-factory="somehttpClientFactory" reply-timeout="${reply.timeout}"/>
</int:chain>
EDIT: ----------------------- --------------------------------
я могу сделать ниже
<int:service-activator input-channel="errorChannel" output-channel="some other channel">
<int-groovy:script> how do i check if the payload.message.cause is a httpstatuscodeexception and then throw it from here
</int-groovy:script> </int:service-activator>
Другой вопрос, у меня есть, если шлюз и шлюз HTTP настраиваются с погрешностью обработчика. есть способ допустить, чтобы httpstatuscodeexception или restclientexception пузырились вверх – Zak