Skip to content

Commit

Permalink
Suppress auth errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Кирилл committed Oct 27, 2023
1 parent defc0b5 commit 897304f
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 897304f

Please sign in to comment.