@@ -107,7 +107,10 @@ instance (FromJSON a, FromJSON b) => FromJSON (Either a b) where
107107 parseJSON (Object (H.toList -> [(key, value)]))
108108 | key == left = Left <$> parseJSON value
109109 | key == right = Right <$> parseJSON value
110− parseJSON _ = fail ""
110+ parseJSON _ = fail $
111+ "expected an object with a single property " ++
112+ "where the property key should be either " ++
113+ "\"Left\" or \"Right\""
111114 {-# INLINE parseJSON #-}
112115
113116left, right :: Text