# Handling MQTT messages with occasional JSON payloads

**URL:** <https://discourse.nodered.org/t/handling-mqtt-messages-with-occasional-json-payloads/14910>\
**Category:** General\
**Created:** [29 August 2019 13:48 UTC](https://discourse.nodered.org/t/handling-mqtt-messages-with-occasional-json-payloads/14910 "2019-08-29T13:48:28Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [2 September 2019 14:20 UTC](https://discourse.nodered.org/t/handling-mqtt-messages-with-occasional-json-payloads/14910/21 "2019-09-02T14:20:07Z")

</div>

> [@hotNipi](#):
>
> Try - catch can be done without coding also

I never knew about this!

Now I can bring the whole Python try: except: mindset to Node-RED 🙂

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [2 September 2019 14:27 UTC](https://discourse.nodered.org/t/handling-mqtt-messages-with-occasional-json-payloads/14910/22 "2019-09-02T14:27:59Z")

</div>

> [@cymplecy](#):
>
> whole Python try: except: mindset to Node-RED

After all, it's better to ask for forgiveness than permission right 😉

[Previous page](https://discourse.nodered.org/t/handling-mqtt-messages-with-occasional-json-payloads/14910.md?page=1)
