in api/src/main/scala/com/gu/adapters/http/ServletWithErrorHandling.scala [7:14]
def getWithErrors(transformers: RouteTransformer*)(action: => Either[Error, (Success, Req)]) = addRoute(Get, transformers, withErrorHandling(action))
def putWithErrors(transformers: RouteTransformer*)(action: => Either[Error, (Success, Req)]) = addRoute(Put, transformers, withErrorHandling(action))
def postWithErrors(transformers: RouteTransformer*)(action: => Either[Error, (Success, Req)]) = addRoute(Post, transformers, withErrorHandling(action))
def deleteWithErrors(transformers: RouteTransformer*)(action: => Either[Error, (Success, Req)]) = addRoute(Delete, transformers, withErrorHandling(action))
def withErrorHandling(response: => Either[Error, (Success, Req)]): ActionResult = {
(handleSuccess orElse handleError)(response)
}