Skip to content

simpleHTTP raises exception on connection refused #92

@wahjava

Description

@wahjava

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions