Skip to content

Instantly share code, notes, and snippets.

@supermanue
Created March 20, 2022 15:53
Show Gist options
  • Save supermanue/c90cca0fe3c118b306ab17c197536d4e to your computer and use it in GitHub Desktop.
Save supermanue/c90cca0fe3c118b306ab17c197536d4e to your computer and use it in GitHub Desktop.
AppError
trait AppError {
val message: String
}
final case class DBError(error: String) extends AppError {
val message = s"DBError: $error"
}
final case class UserNotFound(id: Int) extends AppError {
val message = s"User with id $id not found"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment