3

We have a system that connects to several different APIs operated by different vendors. It uses similar code to connect to all of them, but with two of the APIs (out of 8) we get intermittent HTTPs errors. We never have any problems with the others. We use the same library (Wreq) for all of them.

We've contacted them and they can't see a problem on their side. Also none of their other clients have had any issues.

So, we need to figure out what is going on. What does this error mean?

HttpExceptionRequest Request {
  host = "secure.clarityservices.com"
  port = 443
  secure = True
  requestHeaders = [("Content-Type","text/xml"),("Accept","text/xml")]
  path = "/inquiries"
  queryString = ""
  method = "POST"
  proxy = Nothing
  rawBody = False
  redirectCount = 10
  responseTimeout = ResponseTimeoutDefault
  requestVersion = HTTP/1.1
}
(InternalException (HandshakeFailed (Error_Packet_unexpected "Alert [(AlertLevel_Fatal,HandshakeFailure)]" " expected: change cipher")))

The system is written in Haskell, and uses Wreq to connect to the APIs, both the ones with issues and the ones without.

Sean Clark Hess
  • 15,859
  • 12
  • 52
  • 100
  • 1
    Were you able to connect with `curl` or similar? A broken handshake usually indicates that the other server is down or the configuration is broken. – Zeta Jul 17 '17 at 18:04
  • @Zeta yes, postman works every time. In fact, the production code works most of the time, it's just every once in a while that we get this error. I can't imagine what it could be except their server is going down. – Sean Clark Hess Jul 17 '17 at 22:02
  • I never figured this out. We just added some code to retry the request on connection failures. – Sean Clark Hess Aug 02 '17 at 18:06

0 Answers0