This repository was archived by the owner on Jun 1, 2022. It is now read-only.
This repository was archived by the owner on Jun 1, 2022. It is now read-only.
Add LinkId to LinkException for IlpOverHttpLinks #469
Open
Description
When an IlpOverHttpLink
tries to send a packet, the send operation will occasionally fail with a SocketTimeoutException
. In these cases, it would be useful to see the LinkId
in the exception output. This is especially important for routing updates, because the ILP destination address of the packet doesn't indicated, on its own, which HTTP link the packet was forwarded on.
For example:
LinkException: Unable to sendPacket. preparePacket=InterledgerPreparePacket{, amount=0, expiresAt=2020-08-20T09:56:05.145977Z, executionCondition=Condition{hash=Zmh6rfhivXdsj8GLjp+OIAiXFIVu4jOzkCpZHQ1fKSU=}, destination=InterledgerAddress{value=peer.route.update}, data=6Rubal5gQw65fGJjHrlyKgAAAgsAAAILAAACCwAAr8gXdGVzdC54cHJpbmctZGV2LndjLnByb2QBAAEA} error=timeout
at org.interledger.link.http.IlpOverHttpLink.sendPacket(IlpOverHttpLink.java:198)
at io.github.resilience4j.circuitbreaker.CircuitBreaker.lambda$decorateFunction$10(CircuitBreaker.java:361)
at org.interledger.connector.link.CircuitBreakingLink.sendPacket(CircuitBreakingLink.java:83)
at org.interledger.connector.routing.DefaultCcpSender.sendRouteUpdateRequest(DefaultCcpSender.java:320)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
...
(6 additional frame(s) were not displayed)
SocketTimeoutException: timeout
at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:677)
at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:686)
at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:143)
at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:96)
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106)
...
(23 additional frame(s) were not displayed)