simpleHTTP raises exception on connection refused
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- haskell
- Domain
- networking
Research direction
Start by reading the simpleHTTP and getRequest API paths shown in the issue, then inspect how connection-refused errors are handled and how Either results are returned. Reproduce the example with no service listening on localhost:81; done means the failure is returned as Left and the example prints Error rather than raising an exception. The issue names no files or tests.
Written by the indexing model from the issue text.
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:
*** Exception: connect: does not exist (Connection refused)
To 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.
Thanks!
- Dominant language
- Haskell
- Stars
- 186
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell/HTTP
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement tricorder
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
zip-archive-0.5 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
commercialhaskell/stackage#8124 · 1 comment ·