Skip to content

Commit

Permalink
[DL-716] chore: Fix 2 warnings (exhaustivity in pattern matching)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreLM3 committed Oct 4, 2024
1 parent 219cecc commit c498213
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Authenticated(
.foldLeft[Future[Either[Seq[(String, Throwable)], AuthContext]]](Future.successful(Left(Nil))) {
case (acc, (authMethodName, authMethod)) =>
acc.flatMap {
case authContext if authContext.isRight => Future.successful(authContext)
case authContext @ Right(_) => Future.successful(authContext)
case Left(errors) =>
authMethod(request)
.map(authContext => Right(authContext))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ object JsonFormat {
val categories = (json \ "_categories").as[Map[String, QueryDef]]
val selectables = (json \ "_select").as[Seq[Agg]]
JsSuccess(groupByCaterogy(aggregationName, categories, selectables: _*))
case unexpected: JsValue => JsError(s"Unexpected JsValue $unexpected")
}

implicit val authContextWrites: OWrites[AuthContext] = OWrites[AuthContext] { authContext =>
Expand Down

0 comments on commit c498213

Please sign in to comment.