# Return Error to NodeRed using NodeGen

**URL:** <https://discourse.nodered.org/t/return-error-to-nodered-using-nodegen/45966>\
**Category:** General\
**Created:** [20 May 2021 08:44 UTC](https://discourse.nodered.org/t/return-error-to-nodered-using-nodegen/45966 "2021-05-20T08:44:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crackytsi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crackytsi/32/28369_2.png) [@crackytsi](https://discourse.nodered.org/u/crackytsi)\
**Post date:** [20 May 2021 08:44 UTC](https://discourse.nodered.org/t/return-error-to-nodered-using-nodegen/45966/1 "2021-05-20T08:44:07Z")

</div>

During my Swagger-API-Call an error occures.  
That leads to a returncode 500 and Node-Red shows an error in the node-status.  
Unfortunately node-red shows the debug-output: "", whatever the REST-API response result is.

Is there any way, to set a specific output, that is correctly handed over node-red msg object?

---

<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:** [19 July 2021 08:44 UTC](https://discourse.nodered.org/t/return-error-to-nodered-using-nodegen/45966/2 "2021-07-19T08:44:07Z")

</div>

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