Skip to content

Commit

Permalink
Make it build with scala 3
Browse files Browse the repository at this point in the history
  • Loading branch information
satabin committed Dec 3, 2023
1 parent 05362d4 commit 445d792
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ object DiffsonProtocol {

private def errorToException(error: JsError): Exception =
JsError.toFlatForm(error) match {
case Seq((_, Seq(e, _*)), _*) => PatchException(e.message)
case _ => PatchException("Empty json error")
case Seq((_, Seq(e: JsonValidationError, _*)), _*) => PatchException(e.message)
case _ => PatchException("Empty json error")
}

implicit object JsResultInstances extends MonadError[JsResult, Throwable] {
Expand Down

0 comments on commit 445d792

Please sign in to comment.