Skip to content

Error transforming Node to Any when coming from another Either #145

Answered by kpodsiad
gilcu2 asked this question in Q&A
Discussion options

You must be logged in to vote

You're flatmapping and expecting Either[String, Any] but as[T] returns Either[YamlError, T]. e.flatMap(_.as[Any].left.map(_.toString)) should fix this error.

I wonder if the compiler should have a better message.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gilcu2
Comment options

@kpodsiad
Comment options

Answer selected by gilcu2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants