farbodsz / confluence-cli

Command line interface using Atlassian Confluence REST API.
MIT License
3 stars 1 forks source link

Catch HTTP exceptions from `IO` #5

Open farbodsz opened 1 year ago

farbodsz commented 1 year ago

E.g. HttpExceptionRequest like

confluence: HttpExceptionRequest Request {
  host                 = "https://confluence.mydomain.com/rest/api"
  port                 = 80
  secure               = False
  requestHeaders       = [("Authorization","<REDACTED>")]
  path                 = "/rest/api/space"
  queryString          = "?start=0&limit=25&type"
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
  proxySecureMode      = ProxySecureWithConnect
}
 (ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just "https://confluence.mydomain.com/rest/api", service name: Just "80"): does not exist (Name or service not known))