diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuicommon/http')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala b/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala index 37e7687..c3c60bd 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala @@ -72,7 +72,7 @@ trait Directives { def domainExceptionHandler(req: RequestId): ExceptionHandler = { def errorResponse(ex: Throwable) = - ErrorsResponse(Seq(ResponseError(None, ex.getMessage, ErrorCode.Unspecified)), req) + ErrorsResponse(Seq(ResponseError(None, ex.getMessage, 1)), req) ExceptionHandler { case ex: AuthenticationException => complete(StatusCodes.Unauthorized -> errorResponse(ex)) case ex: AuthorizationException => complete(StatusCodes.Forbidden -> errorResponse(ex)) @@ -85,7 +85,7 @@ trait Directives { def domainRejectionHandler(req: RequestId): RejectionHandler = { def wrapContent(message: String) = { import ErrorsResponse._ - val err: ErrorsResponse = ErrorsResponse(Seq(ResponseError(None, message, ErrorCode.Unspecified)), req) + val err: ErrorsResponse = ErrorsResponse(Seq(ResponseError(None, message, 1)), req) val text = errorsResponseJsonFormat.write(err).toString() HttpEntity(ContentTypes.`application/json`, text) } |