Title: simpleHTTP raises exception on connection refused · Issue #92 · haskell/HTTP · GitHub
Open Graph Title: simpleHTTP raises exception on connection refused · Issue #92 · haskell/HTTP
X Title: simpleHTTP raises exception on connection refused · Issue #92 · haskell/HTTP
Description: When nothing listening on localhost:81, with following code: (simpleHTTP (getRequest "http://localhost:81/")) >>= (\r -> case r of Left _ -> putStrLn "Error"; Right _ -> putStrLn "Alright!") instead of printing Error, I get: *** Exceptio...
Open Graph Description: When nothing listening on localhost:81, with following code: (simpleHTTP (getRequest "http://localhost:81/")) >>= (\r -> case r of Left _ -> putStrLn "Error"; Right _ -> putStrLn "Alright!") instea...
X Description: When nothing listening on localhost:81, with following code: (simpleHTTP (getRequest "http://localhost:81/")) >>= (\r -> case r of Left _ -> putStrLn "Error"; Right ...
Opengraph URL: https://github.com/haskell/HTTP/issues/92
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"simpleHTTP raises exception on connection refused","articleBody":"When nothing listening on `localhost:81`, with following code:\n\n```\n(simpleHTTP (getRequest \"http://localhost:81/\")) \u003e\u003e= (\\r -\u003e case r of Left _ -\u003e putStrLn \"Error\"; Right _ -\u003e putStrLn \"Alright!\")\n```\n\ninstead of printing `Error`, I get:\n\n```\n*** Exception: connect: does not exist (Connection refused)\n```\n\nTo me, and as suggested by someone in `#haskell`, this seems like an unexpected behaviour. I'm expecting error condition to be passed in return value.\n\nThanks!\n","author":{"url":"https://github.com/wahjava","@type":"Person","name":"wahjava"},"datePublished":"2015-11-16T03:54:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/92/HTTP/issues/92"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:32b6e8fa-dba5-0215-8aaf-c7143d80c46c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 975A:BA555:41885E:5512D7:698D2AF3 |
| html-safe-nonce | 3d18651c871978d36195c8fac2a5352e424c058895333290c6638b5345c8be8a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzVBOkJBNTU1OjQxODg1RTo1NTEyRDc6Njk4RDJBRjMiLCJ2aXNpdG9yX2lkIjoiMTE4ODA3MzM1Njk3NDE3MjkxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c19786521baf133421da069de74c4dd10013aba1fa3b10583aba65812962f333 |
| hovercard-subject-tag | issue:117047174 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/haskell/HTTP/92/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e12973ccd649694c13575a0778ca3c8b4ef56b312add98629b21539b8e89b5c7/haskell/HTTP/issues/92 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e12973ccd649694c13575a0778ca3c8b4ef56b312add98629b21539b8e89b5c7/haskell/HTTP/issues/92 |
| og:image:alt | When nothing listening on localhost:81, with following code: (simpleHTTP (getRequest "http://localhost:81/")) >>= (\r -> case r of Left _ -> putStrLn "Error"; Right _ -> putStrLn "Alright!") instea... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wahjava |
| hostname | github.com |
| expected-hostname | github.com |
| None | c25395580e1e3bf82d705e0982a1b24255366088720fef945f1493d5e3e67954 |
| turbo-cache-control | no-preview |
| go-import | github.com/haskell/HTTP git https://github.com/haskell/HTTP.git |
| octolytics-dimension-user_id | 450574 |
| octolytics-dimension-user_login | haskell |
| octolytics-dimension-repository_id | 1039256 |
| octolytics-dimension-repository_nwo | haskell/HTTP |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1039256 |
| octolytics-dimension-repository_network_root_nwo | haskell/HTTP |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1fa2bc33fc715bfb2cb9dd8a9cad4f811c16c371 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width