Skip to content

Commit

Permalink
Suppress auth errors (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillPamPam authored Oct 30, 2023
1 parent defc0b5 commit 4ea4fa5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4ea4fa5

Please sign in to comment.