> For the complete documentation index, see [llms.txt](https://socket.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://socket.gitbook.io/docs/4-fu-wu-duan-apiserverapi/4.3-socket/event_error.md).

# 4.3.26 event\_error

* `error` (Object) 错误对象

发生错误时触发。

```javascript
io.on('connection',socket=>{
    socket.on('error',error=>{
        //
    })
})
```
