Send error response when update metadata fails. (#2849)
Keeping it simple for the first implementation. - Send error response only if request_id != 0 - Two kinds of errors notified o does not have permissions - NOT_ALLOWED o attributes exceeds size limits - INVALID_ARGUMENT
This commit is contained in:
@@ -197,6 +197,18 @@ func (p *ParticipantImpl) SendRefreshToken(token string) error {
|
||||
})
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) SendErrorResponse(errorResponse *livekit.ErrorResponse) error {
|
||||
if errorResponse.RequestId == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return p.writeMessage(&livekit.SignalResponse{
|
||||
Message: &livekit.SignalResponse_ErrorResponse{
|
||||
ErrorResponse: errorResponse,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) HandleReconnectAndSendResponse(reconnectReason livekit.ReconnectReason, reconnectResponse *livekit.ReconnectResponse) error {
|
||||
p.TransportManager.HandleClientReconnect(reconnectReason)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user