refactor: improve request type validation and enhance sensitive information masking

This commit is contained in:
CaIon
2025-08-15 13:20:36 +08:00
parent 03fc89da00
commit 5fe1ce89ec
11 changed files with 87 additions and 102 deletions

View File

@@ -122,6 +122,9 @@ func WssObject(c *gin.Context, ws *websocket.Conn, object interface{}) error {
}
func WssError(c *gin.Context, ws *websocket.Conn, openaiError types.OpenAIError) {
if ws == nil {
return
}
errorObj := &dto.RealtimeEvent{
Type: "error",
EventId: GetLocalRealtimeID(c),