checkException :: (String -> IO ())
               -> Error
               -> Result Value
               -> IO ()
checkException step exception res = do
  step "Got an exception"
  case res of
    -- HttpException isn't Eqable, so we simply coerce with show
    Left err -> show exception @=? show err
    Right val -> assertFailure $ unwords
                                   [ "Didn't get expected exception"
                                   , show exception
                                   , "instead"
                                   , show val
                                   ]
checkException :: (String -> IO ())
               -> Error
               -> Result Value
               -> IO ()
checkException step exception res = do
  step "Got an exception"
  case res of
    -- HttpException isn't Eqable, so we simply coerce with show
    Left err -> show exception @=? show err
    Right val -> assertFailure $ unwords
                                   [ "Didn't get expected exception"
                                   , show exception
                                   , "instead"
                                   , show val
                                   ]
checkException step exception res = do
  step "Got an exception"
  case res of
    -- HttpException isn't Eqable, so we simply coerce with show
    Left err -> show exception @=? show err
    Right val -> assertFailure $ unwords
                                   [ "Didn't get expected exception"
                                   , show exception
                                   , "instead"
                                   , show val
                                   ]