diff options
author | Jakob Odersky <jakob@driver.xyz> | 2017-10-20 15:52:07 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@driver.xyz> | 2017-10-20 15:52:07 -0700 |
commit | d1537fa8bbf7c7097fe7ddb410e40c82381d79f2 (patch) | |
tree | bb2db32e6845ea7f9cfe9627c9caffe9acb87c42 /src/main | |
parent | 2ebb8f0a91f57259297f7ef1128d8d07e3146621 (diff) | |
download | rest-query-d1537fa8bbf7c7097fe7ddb410e40c82381d79f2.tar.gz rest-query-d1537fa8bbf7c7097fe7ddb410e40c82381d79f2.tar.bz2 rest-query-d1537fa8bbf7c7097fe7ddb410e40c82381d79f2.zip |
Use core rejection handler
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala b/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala index e9a4132..67da717 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala @@ -3,6 +3,7 @@ package xyz.driver.pdsuicommon.http import akka.http.scaladsl.server._ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.model._ +import xyz.driver.core.app.DriverApp import xyz.driver.core.rest.ContextHeaders import xyz.driver.entities.users.AuthUserInfo import xyz.driver.pdsuicommon.auth._ @@ -88,7 +89,7 @@ trait Directives { val text = Json.stringify(implicitly[Writes[ErrorsResponse]].writes(err)) HttpEntity(ContentTypes.`application/json`, text) } - RejectionHandler.default.mapRejectionResponse { + DriverApp.rejectionHandler.mapRejectionResponse { case res @ HttpResponse(_, _, ent: HttpEntity.Strict, _) => res.copy(entity = wrapContent(ent.data.utf8String)) case x => x // pass through all other types of responses |