on master help sign in
better error
commit4356c47ad8df4240aab484a577656440b4b10c1e authorMark Wotton <mwotton@gmail.com> dateFri 4 Sep 2020, 12:01 (6 years ago) parent8c7fd64
1 file changed+2−2
src/Roboservant/StateMachine.hs+2−2
src/Roboservant/StateMachine.hs+2−2
@@ -240,8 +240,8 @@ tests = do
240240 let clientEnv = mkClientEnv manager burl
241241 -- faking this out for now.
242242 footype = typeOf Foo
243− handleError :: forall a b m. Applicative m => (Either b a) -> m a
244− handleError = either (error "oopsie") pure
243+ handleError :: forall a b m. (Show b, Applicative m) => (Either b a) -> m a
244+ handleError = either (error . show) pure
245245 reifiedApi =
246246 [ (ApiOffset 0, [], footype, toDyn $ toDyn <$> (runClientM introC clientEnv >>= handleError)),
247247 (ApiOffset 1, [footype, footype], footype, toDyn $ \f1 f2 -> toDyn <$> (runClientM (combineC f1 f2) clientEnv >>= handleError)),