We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When nothing listening on localhost:81, with following code:
localhost:81
(simpleHTTP (getRequest "http://localhost:81/")) >>= (\r -> case r of Left _ -> putStrLn "Error"; Right _ -> putStrLn "Alright!")
instead of printing Error, I get:
Error
*** 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.
#haskell
Thanks!
The text was updated successfully, but these errors were encountered:
With pull request #102 the behaviour changes to:
λ> import Network.HTTP λ> Network.HTTP.simpleHTTP (getRequest "http://localhost:81") Left (ErrorMisc "connect: does not exist (Connection refused)")
Sorry, something went wrong.
Fix #92: Fix exception handling for simpleHTTP on connection refused
4afaadf
Successfully merging a pull request may close this issue.
When nothing listening on
localhost:81
, with following code:instead of printing
Error
, I get: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!
The text was updated successfully, but these errors were encountered: