All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.prismic.ApiError.scala Maven / Gradle / Ivy

The newest version!
package io.prismic

/**
 * Error thrown when communicating with prismic.io API
 */
sealed trait ApiError extends RuntimeException {
  def message: String
  override def getMessage = message
}

/**
 * Error thrown when the auth token is omitted, but required
 */
case class AuthorizationNeeded(message: String, oAuthUrl: String) extends ApiError
/**
 * Error thrown when the auth token is provided, but invalid
 */
case class InvalidToken(message: String, oAuthUrl: String) extends ApiError
/**
 * Error that should never happen
 */
case class UnexpectedError(message: String) extends ApiError




© 2015 - 2025 Weber Informatics LLC | Privacy Policy