Skip to content

Commit b670ccf

Browse files
committed
[DL-716] chore: Fix 2 warnings (exhaustivity in pattern matching)
1 parent 3ef3bd0 commit b670ccf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

elastic4play/app/org/elastic4play/controllers/Authenticated.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Authenticated(
162162
.foldLeft[Future[Either[Seq[(String, Throwable)], AuthContext]]](Future.successful(Left(Nil))) {
163163
case (acc, (authMethodName, authMethod)) =>
164164
acc.flatMap {
165-
case authContext if authContext.isRight => Future.successful(authContext)
165+
case authContext @ Right(_) => Future.successful(authContext)
166166
case Left(errors) =>
167167
authMethod(request)
168168
.map(authContext => Right(authContext))

elastic4play/app/org/elastic4play/services/JsonFormat.scala

+1
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ object JsonFormat {
203203
val categories = (json \ "_categories").as[Map[String, QueryDef]]
204204
val selectables = (json \ "_select").as[Seq[Agg]]
205205
JsSuccess(groupByCaterogy(aggregationName, categories, selectables: _*))
206+
case unexpected: JsValue => JsError(s"Unexpected JsValue $unexpected")
206207
}
207208

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

0 commit comments

Comments
 (0)