Skip to content

Instantly share code, notes, and snippets.

Created June 15, 2017 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0b89aa7e6122f4e747891c8bb959cbb6 to your computer and use it in GitHub Desktop.
Save anonymous/0b89aa7e6122f4e747891c8bb959cbb6 to your computer and use it in GitHub Desktop.
the description for this gist
val detailedErrorA = Optional[Error, String]{
case err: ErrorA => Some(err.details.detailedMessage)
case _ => None
}{ newDetailedMsg => from =>
from match {
case err: ErrorA => err.copy(details = err.details.copy(newDetailedMsg))
case _ => from
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment