You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the OUT node for node-red-node-mongodb (which is provided with the extra nodes package) should provide an output, so we can process the status of the query (Did it fail ? Did it succeed ? When ?).
Simple real case : I'm exposing an HTTP endpoint updating a document in a mongo DB. As of right now, I have no means to send the HTTP response WHEN the query is done, or to provide details on the success of the query in the HTTP response. My only option is to send a HTTP 200 when the HTTP endpoint is called, meaning I cannot send an error response when/if the node fails.
I was suggested on the node-red forum to use the status node to catch status emitted from the mongo node, but with this method, I cannot keep the http related properties (msg.req, etc...) to send to the http out node (since you can only pass fill, shape and text properties with status, where you can send a whole object with node.error for example).
I'm willing to implement this if needed.
Have a good day
The text was updated successfully, but these errors were encountered:
Hi, as mentioned in the template you deleted before raising this issue, we prefer feature requests to be raised and discussed on slack or the forum rather than in issues. We try and keep issues for actual code defects.
In this case look at the catch node which can be used to detect failures.
I've posted on the forum, but only had one answer which was the "status" proposal. It doesn't solve the problem, as I can't use this method to conserve http.req properties for the http out node. The thread starts to be buried, and I have no solution except for maintaining a fork, which sounds overkill.
The catch node also cannot be used : the mongo node doens't emit an error on a query success.
This is to me is an actual defect : there is no way as-is to use the mongo node for a HTTP endpoint, answering only when the query is done.
I found no example on the web using this node (it looks like people are switching to mongodb2 which is not in the "official" extra node package).
Hi,
I think the OUT node for node-red-node-mongodb (which is provided with the extra nodes package) should provide an output, so we can process the status of the query (Did it fail ? Did it succeed ? When ?).
Simple real case : I'm exposing an HTTP endpoint updating a document in a mongo DB. As of right now, I have no means to send the HTTP response WHEN the query is done, or to provide details on the success of the query in the HTTP response. My only option is to send a HTTP 200 when the HTTP endpoint is called, meaning I cannot send an error response when/if the node fails.
I was suggested on the node-red forum to use the status node to catch status emitted from the mongo node, but with this method, I cannot keep the http related properties (msg.req, etc...) to send to the http out node (since you can only pass fill, shape and text properties with status, where you can send a whole object with node.error for example).
I'm willing to implement this if needed.
Have a good day
The text was updated successfully, but these errors were encountered: