# Typo in websocket

**URL:** <https://discourse.nodered.org/t/typo-in-websocket/87458>\
**Category:** Core Development\
**Created:** [24 April 2024 11:28 UTC](https://discourse.nodered.org/t/typo-in-websocket/87458 "2024-04-24T11:28:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [24 April 2024 11:28 UTC](https://discourse.nodered.org/t/typo-in-websocket/87458/1 "2024-04-24T11:28:25Z")

</div>

Hi There,

quick headsup, I was going through the ~~documentation~~ codebase and found [this typo](https://github.com/node-red/node-red/blob/211d420fb233763a0ac86c8b8eb59f94e0569790/packages/node_modules/%40node-red/nodes/core/network/22-websocket.js#L373) in the websocket node --\> 'erro' should be 'error' I would assume ....

Cheers!

Edit: [here too?](https://github.com/node-red/node-red/blob/211d420fb233763a0ac86c8b8eb59f94e0569790/packages/node_modules/%40node-red/nodes/core/network/22-websocket.js#L326) or is the event really 'erro' .... hm 🤔

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [24 April 2024 20:15 UTC](https://discourse.nodered.org/t/typo-in-websocket/87458/2 "2024-04-24T20:15:30Z")

</div>

I think it is intentional - although not necessarily how I'd chose to do it. It emits a custom error event, but it can't call it `error` as that's an existing event - so it calls it `erro` ...

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [24 April 2024 22:44 UTC](https://discourse.nodered.org/t/typo-in-websocket/87458/3 "2024-04-24T22:44:24Z")

</div>

Having a look at the entire [commit](https://github.com/node-red/node-red/commit/19a103d3a09f91759219125e49989d04f442600e), it does emit an [erro](https://github.com/node-red/node-red/commit/19a103d3a09f91759219125e49989d04f442600e#diff-695c7ce91b6ccfef80945d1ccf79c3afd789a2debd26f88d8f18fbbb4059d07bL98) - considering the other two `opened` and `closed`, perhaps `errored` would have been a better choice 😉

I assumed that it was capturing native events and not self generated ones - mea culpa!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 May 2024 22:45 UTC](https://discourse.nodered.org/t/typo-in-websocket/87458/4 "2024-05-08T22:45:04Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
