Suppress auth errors (#329)

This commit is contained in:
KirillPamPam
2023-10-30 14:33:13 +04:00
committed by GitHub
parent defc0b5a7b
commit 4ea4fa5d81

View File

@@ -30,9 +30,8 @@ class AuthInterceptor(
if (isOrdinaryMethod && (sessionId == null || !authContext.containsSession(sessionId))) {
val cause = if (sessionId == null) "sessionId is not passed" else "Session $sessionId does not exist"
throw Status.UNAUTHENTICATED
.withDescription(cause)
.asException()
call.close(Status.UNAUTHENTICATED.withDescription(cause), Metadata())
return object : ServerCall.Listener<ReqT>() {}
}
return next.startCall(call, headers)