Created
March 20, 2022 15:53
-
-
Save supermanue/c90cca0fe3c118b306ab17c197536d4e to your computer and use it in GitHub Desktop.
AppError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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