|
|
@ -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) |
|
|
|
} |
|
|
|