Skip to content

Commit 2e09ac0

Browse files
committed
fix not found rejection for grpc services
1 parent e65b5b7 commit 2e09ac0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/src/main/scala/app/softnetwork/api/server/ApiRoutes.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ trait ApiRoutes extends Directives with GrpcServices with DefaultComplete {
5757
}
5858
.result()
5959

60-
val timeoutExceptionHandler: ExceptionHandler =
60+
val exceptionHandler: ExceptionHandler =
6161
ExceptionHandler { case e: TimeoutException =>
6262
extractUri { uri =>
6363
log.error(
@@ -71,7 +71,7 @@ trait ApiRoutes extends Directives with GrpcServices with DefaultComplete {
7171
final def mainRoutes: ActorSystem[_] => Route = system => {
7272
val routes = concat((HealthCheckService :: apiRoutes(system)).map(_.route): _*)
7373
handleRejections(rejectionHandler) {
74-
handleExceptions(timeoutExceptionHandler) {
74+
handleExceptions(exceptionHandler) {
7575
logRequestResult("RestAll") {
7676
pathPrefix(config.ServerSettings.RootPath) {
7777
Try(
@@ -89,10 +89,10 @@ trait ApiRoutes extends Directives with GrpcServices with DefaultComplete {
8989
)
9090
)
9191
}
92-
}
92+
} ~ grpcRoutes(system)
9393
}
9494
}
95-
} ~ grpcRoutes(system)
95+
}
9696
}
9797

9898
def apiRoutes: ActorSystem[_] => List[ApiRoute]

0 commit comments

Comments
 (0)