diff options
author | Zach Smith <zach@driver.xyz> | 2017-10-17 14:57:31 -0700 |
---|---|---|
committer | Zach Smith <zach@driver.xyz> | 2017-10-31 09:17:49 -0700 |
commit | e5911d0f0fa382f37a22978a5bae1d6c4b47963f (patch) | |
tree | 7679e6881a70a2e8576060683385bb81f676634f /src/main/scala/xyz/driver/core/rest/DriverRoute.scala | |
parent | 4715cdab47febe8bb75c81d45d9619fc224477bc (diff) | |
download | driver-core-e5911d0f0fa382f37a22978a5bae1d6c4b47963f.tar.gz driver-core-e5911d0f0fa382f37a22978a5bae1d6c4b47963f.tar.bz2 driver-core-e5911d0f0fa382f37a22978a5bae1d6c4b47963f.zip |
Rename APIError -> ServiceException and subclasses
Diffstat (limited to 'src/main/scala/xyz/driver/core/rest/DriverRoute.scala')
-rw-r--r-- | src/main/scala/xyz/driver/core/rest/DriverRoute.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/xyz/driver/core/rest/DriverRoute.scala b/src/main/scala/xyz/driver/core/rest/DriverRoute.scala index 20cc556..f3260d0 100644 --- a/src/main/scala/xyz/driver/core/rest/DriverRoute.scala +++ b/src/main/scala/xyz/driver/core/rest/DriverRoute.scala @@ -10,7 +10,7 @@ import akka.http.scaladsl.server.{ExceptionHandler, RequestContext, Route} import com.typesafe.scalalogging.Logger import org.slf4j.MDC import xyz.driver.core.rest -import xyz.driver.core.rest.errors.APIError +import xyz.driver.core.rest.errors.ServiceException import scala.compat.Platform.ConcurrentModificationException @@ -29,12 +29,12 @@ trait DriverRoute { * @return Exception handling route for exception type */ protected def exceptionHandler: PartialFunction[Throwable, Route] = { - case api: APIError if api.isPatientSensitive => + case api: ServiceException if api.isPatientSensitive => ctx => log.info("PHI Sensitive error") errorResponse(ctx, InternalServerError, "Server error", api)(ctx) - case api: APIError => + case api: ServiceException => ctx => log.info("API Error") errorResponse(ctx, api.statusCode, api.message, api)(ctx) |