Created
December 18, 2017 16:27
-
-
Save robhinds/cabe561a0fe49a7869a619cd4784f962 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
type Response[T] = Either[AkkOpError, T] | |
object Errors { | |
sealed trait AkkOpError { | |
val statusCode: Int | |
val data: String | |
} | |
case class NotFound(data: String, statusCode: Int = StatusCodes.NotFound.intValue) extends AkkOpError | |
case class BadRequest(data: String, statusCode: Int = StatusCodes.BadRequest.intValue) extends AkkOpError | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment