sunny/errors

A module with the errors you could get using Sunny.

Types

pub type ApiError {
  NoResultsError(msg: String)
  InvalidArgumentError(msg: String)
}

Constructors

  • NoResultsError(msg: String)
  • InvalidArgumentError(msg: String)
pub type DataError {
  DataNotFoundError(msg: String)
}

Constructors

  • DataNotFoundError(msg: String)
pub type InternalError {
  InternalError(msg: String)
}

Constructors

  • InternalError(msg: String)
pub type SunnyError {
  DecodeError(err: json.DecodeError)
  ApiError(err: ApiError)
  DataError(err: DataError)
  SunnyInternalError(err: InternalError)
}

Constructors

  • DecodeError(err: json.DecodeError)

    Something went wrong with decoding the json obtained with the request.

  • ApiError(err: ApiError)

    An API-related error (e.g. wrong arguments)

  • DataError(err: DataError)

    Something went wrong while handling data.

  • SunnyInternalError(err: InternalError)

    Something went wrong internally. If you get this error, please create an issue on Github.

Search Document