Browse Source

server: Fix messages on PaginatedQueryError

scalafmt-draft
Alexis Hernandez 7 years ago
parent
commit
a784e60641
  1. 4
      server/app/com/xsn/explorer/errors/paginatedQueryErrors.scala

4
server/app/com/xsn/explorer/errors/paginatedQueryErrors.scala

@ -7,7 +7,7 @@ sealed trait PaginatedQueryError
case object PaginatedQueryOffsetError extends PaginatedQueryError with InputValidationError {
override def toPublicErrorList(messagesApi: MessagesApi)(implicit lang: Lang): List[PublicError] = {
val message = messagesApi("error.paginatedQuery.offset")
val message = messagesApi("error.paginatedQuery.offset.invalid")
val error = FieldValidationError("offset", message)
List(error)
}
@ -15,7 +15,7 @@ case object PaginatedQueryOffsetError extends PaginatedQueryError with InputVali
case class PaginatedQueryLimitError(maxValue: Int) extends PaginatedQueryError with InputValidationError {
override def toPublicErrorList(messagesApi: MessagesApi)(implicit lang: Lang): List[PublicError] = {
val message = messagesApi("error.paginatedQuery.limit", maxValue)
val message = messagesApi("error.paginatedQuery.limit.invalid", maxValue)
val error = FieldValidationError("limit", message)
List(error)
}

Loading…
Cancel
Save