# BUG: With version 3.1.1 in NodeRed I have an error using the switch node

**URL:** <https://discourse.nodered.org/t/bug-with-version-3-1-1-in-nodered-i-have-an-error-using-the-switch-node/83346>\
**Category:** Core Development\
**Created:** [1 December 2023 13:00 UTC](https://discourse.nodered.org/t/bug-with-version-3-1-1-in-nodered-i-have-an-error-using-the-switch-node/83346 "2023-12-01T13:00:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mickym2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mickym2/32/36128_2.png) [@mickym2](https://discourse.nodered.org/u/mickym2)\
**Post date:** [1 December 2023 13:00 UTC](https://discourse.nodered.org/t/bug-with-version-3-1-1-in-nodered-i-have-an-error-using-the-switch-node/83346/1 "2023-12-01T13:00:15Z")

</div>

I opened an issue - as i have a problem with my switch node - which was correctly working in version 3.1.0 but no longer in version 3.1.1.

I get an error of a incorrect configured node when I use the possibility if the input is a valid JSON string.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1c39f7e10fb192c69848d6456785facea78b4ced.png)

> <https://github.com/node-red/node-red/issues/4464>
>
> \### Current Behavior
> 
> I have still a problem with a switch Node since Version 3.…1 as it mentions an error when I test if a string is a valid JSON string.
> 
> !\[image\](https://github.com/node-red/node-red/assets/58858526/faee365a-2f0e-4c0e-bf8e-e4867487d20b)
> 
> I get an error of an incorrect configured node;
> 
> !\[image\](https://github.com/node-red/node-red/assets/58858526/68c853b7-ec37-4b3b-b6ac-630867f01cd1)
> 
> 
> \### Expected Behavior
> 
> \_No response\_
> 
> \### Steps To Reproduce
> 
> \_No response\_
> 
> \### Example flow
> 
> \`\`\`
> paste your flow here
> \`\`\`
> 
> 
> \### Environment
> 
> \- Node-RED version:
> \- Node.js version:
> \- npm version:
> \- Platform/OS:
> \- Browser:

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [1 December 2023 13:21 UTC](https://discourse.nodered.org/t/bug-with-version-3-1-1-in-nodered-i-have-an-error-using-the-switch-node/83346/2 "2023-12-01T13:21:30Z")

</div>

Thanks, this is a bug in input validation, you can ignore it for now, you didn't break anything 🙂

---

<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:** [1 December 2023 13:28 UTC](https://discourse.nodered.org/t/bug-with-version-3-1-1-in-nodered-i-have-an-error-using-the-switch-node/83346/3 "2023-12-01T13:28:12Z")

</div>

Fixed via [Fix switch validation of typeof field by knolleary · Pull Request #4465 · node-red/node-red · GitHub](https://github.com/node-red/node-red/pull/4465)

---

<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:** [15 December 2023 13:28 UTC](https://discourse.nodered.org/t/bug-with-version-3-1-1-in-nodered-i-have-an-error-using-the-switch-node/83346/4 "2023-12-15T13:28:57Z")

</div>

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