How best to handle connection failures with Hyper

I’m using Hyper 7.5.2 and on certain requests, we’re seeing the following error:

"cfhttp","httpRequest [GET] to [https://www.timeapi.io/api/TimeZone/zone?timeZone=America/Chicago], returned [Connection Failure. Status code unavailable.] in 2185ms,  at /app/.../hyper/models/CfhttpHttpClient.cfc.makeCFHTTPRequest():317;
/app/.../hyper/models/CfhttpHttpClient.cfc.send():15;
/app/.../hyper/models/HyperRequest.cfc.send():1090;
/app/.../hyper/models/HyperRequest.cfc.get():249;
/app/.../hyper/models/HyperBuilder.cfc.onMissingMethod():269;
/app/.../geo.cfc.getTimeApiTimeZoneInfo():273;
/app/.../main.cfc.saveTaskResult():253;
/app/framework/one.cfc.doController():1635;
/app/framework/one.cfc.onRequest():896;Remote host terminated the handshake;SSL peer shut down incorrectly;javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake

Wondering if there is an elegant way or standard approach with Hyper for handling this type of response.

CommandBox server running lucee-light@6.2.1-SNAPSHOT+95 on Java 21.

I’d be curious to see the memento of the returned response. Hyper has some handling for Request Time-out and Connection Failure, but it’s possible this string is slightly different.

In those cases, it should return a 502 Bad Gateway.

If it doesn’t conform to what Hyper is expecting or if you want to handle it in a custom way, you can use a response callback to check for custom conditions and even throw an exception from there.

Alternatively, you can use Hyper’s built-in retry functionality if you think it was a fluke and will work the next request.

I might be able to capture the memento, or at least some more data - this endpoint is particularly flaky so catching it doing this again is pretty likely.

Based on the error, I was under the assumption that it was a cfhttp error, and nothing was even making it back to Hyper.

What would be best for me to try to capture - the result of makeCFHTTPRequest if possible?