# Help with \`link call\` getting errors

**URL:** <https://discourse.nodered.org/t/help-with-link-call-getting-errors/63667>\
**Category:** General\
**Created:** [9 June 2022 10:04 UTC](https://discourse.nodered.org/t/help-with-link-call-getting-errors/63667 "2022-06-09T10:04:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [9 June 2022 10:04 UTC](https://discourse.nodered.org/t/help-with-link-call-getting-errors/63667/1 "2022-06-09T10:04:20Z")

</div>

I have a working example of how to do it and that works.

I then applied this structure to a real flow and it threw a _wobbly_ when a message went through.

(I'm not sure how good this capture of the error is)

```auto
{"message":"timeout","source":{"id":"622d91911b9a4889","type":"link call","count":1}}

```

This is an exert from the real code - which has testing nodes still there.

```auto
[{"id":"bef2feb18f00fe84","type":"fan","z":"9b0812dc9a773b4e","name":"","x":105,"y":230,"wires":[["7a4c3333f48d6deb"]],"l":false},{"id":"93bcb6e9de127901","type":"inject","z":"9b0812dc9a773b4e","name":"Block me","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Block","payloadType":"str","x":150,"y":140,"wires":[["bef2feb18f00fe84"]]},{"id":"7889e2861e473050","type":"inject","z":"9b0812dc9a773b4e","name":"Other messages","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":170,"y":100,"wires":[["bef2feb18f00fe84"]]},{"id":"7a4c3333f48d6deb","type":"switch","z":"9b0812dc9a773b4e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"GPS","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":195,"y":230,"wires":[["ed58ace4b1421fdb"],["df73549273bf33d6"]],"l":false},{"id":"80770c7ed7a033f9","type":"inject","z":"9b0812dc9a773b4e","name":"Pass","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"pass","payloadType":"str","x":340,"y":50,"wires":[["7681ee6b20ebc897"]]},{"id":"171c8b6bc5ef5c41","type":"inject","z":"9b0812dc9a773b4e","name":"Block","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"block","payloadType":"str","x":340,"y":90,"wires":[["7681ee6b20ebc897"]]},{"id":"7681ee6b20ebc897","type":"change","z":"9b0812dc9a773b4e","name":"","rules":[{"t":"set","p":"A","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":70,"wires":[[]]},{"id":"df73549273bf33d6","type":"switch","z":"9b0812dc9a773b4e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Others","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":455,"y":230,"wires":[["af53bd8c6f4cbd8d"],["dbf0b85a2155c74c"]],"l":false},{"id":"ed58ace4b1421fdb","type":"switch","z":"9b0812dc9a773b4e","name":"A","property":"A","propertyType":"flow","rules":[{"t":"eq","v":"pass","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":190,"wires":[["df73549273bf33d6"]]},{"id":"af53bd8c6f4cbd8d","type":"switch","z":"9b0812dc9a773b4e","name":"B","property":"B","propertyType":"flow","rules":[{"t":"eq","v":"pass","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":560,"y":190,"wires":[["dbf0b85a2155c74c"]]},{"id":"5e3bd07ef350e96d","type":"link in","z":"9b0812dc9a773b4e","name":"SOM EOM Filter IN","links":[],"x":120,"y":280,"wires":[["bef2feb18f00fe84"]],"l":true}]

```

The `switch` node to detect the message has been changed for the real world application - sorry.  
But the mechanics are the same. I hope.  
I can't see any problems.

However, while typing this I did notice a possible problem.

This _routine_ is to stop unwanted messages to go through there is not always a guaranteed return.  
Could that be a cause - as I did see the word `timeout` in the error.

I'm going to change it to `link out` and `link in` nodes and do it the old way.  
(It has to work in real life)

This is the message which will be actually sent:

```auto
{"topic":"SOM EOM","qos":0,"retain":false,"_msgid":"fdd66fdac19d3c5c","type":"EOM","origPayload":"GPS comms FAILURE","settings":{"input":"2022-06-09T09:57:45.517Z","input_format":"","input_tz":"Australia/Sydney","output_format":"YYYY-MM-DD HH:mm:ss","output_locale":"en_AU","output_tz":"Australia/Sydney"},"time":"2022-06-09 19:57:45","payload":"GPS comms FAILURE 2022-06-09 19:57:45","_event":"node:1a2a766b.e52f42"}

```

This is near complete exert from the routine. Connect the link nodes to the nearest nodes.  
(Foreign node in my flow)

```auto
[{"id":"5e3bd07ef350e96d","type":"link in","z":"9b0812dc9a773b4e","name":"SOM EOM Filter IN","links":[],"x":120,"y":280,"wires":[["bef2feb18f00fe84"]],"l":true},{"id":"7a4c3333f48d6deb","type":"switch","z":"9b0812dc9a773b4e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"GPS","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":195,"y":230,"wires":[["ed58ace4b1421fdb"],["df73549273bf33d6"]],"l":false},{"id":"ed58ace4b1421fdb","type":"switch","z":"9b0812dc9a773b4e","name":"A","property":"A","propertyType":"flow","rules":[{"t":"eq","v":"pass","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":190,"wires":[["df73549273bf33d6"]]},{"id":"df73549273bf33d6","type":"switch","z":"9b0812dc9a773b4e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Others","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":455,"y":230,"wires":[["af53bd8c6f4cbd8d"],["dbf0b85a2155c74c"]],"l":false},{"id":"af53bd8c6f4cbd8d","type":"switch","z":"9b0812dc9a773b4e","name":"B","property":"B","propertyType":"flow","rules":[{"t":"eq","v":"pass","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":560,"y":190,"wires":[["dbf0b85a2155c74c"]]},{"id":"dbf0b85a2155c74c","type":"switch","z":"9b0812dc9a773b4e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Others","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":705,"y":230,"wires":[["2c52157f3270e859"],["a3bd5e6cb9fb31be"]],"l":false},{"id":"2c52157f3270e859","type":"switch","z":"9b0812dc9a773b4e","name":"C","property":"C","propertyType":"flow","rules":[{"t":"eq","v":"pass","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":810,"y":190,"wires":[["a3bd5e6cb9fb31be"]]},{"id":"5f24facfc44d3183","type":"link out","z":"9b0812dc9a773b4e","name":"SOM EOM Filter OUT","mode":"return","links":[],"x":1260,"y":230,"wires":[],"l":true}]

```

This is the node which is at the other end:

```auto
[{"id":"622d91911b9a4889","type":"link call","z":"c56bddee.ca0a18","g":"0d1fddaacb85e8f4","name":"","links":["5e3bd07ef350e96d"],"timeout":"30","x":370,"y":2670,"wires":[["d2ff3778.e82568","d5fa32d101eb2095"]]}]

```

Is that enough information?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 June 2022 10:36 UTC](https://discourse.nodered.org/t/help-with-link-call-getting-errors/63667/2 "2022-06-09T10:36:18Z")

</div>

> [@Trying\_to\_learn](#):
>
> This _routine_ is to stop unwanted messages to go through there is not always a guaranteed return.  
> Could that be a cause - as I did see the word `timeout` in the error.

yes.

Basically, allow the message to return but discard it at the output of the link-call.

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

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [9 June 2022 10:37 UTC](https://discourse.nodered.org/t/help-with-link-call-getting-errors/63667/3 "2022-06-09T10:37:57Z")

</div>

Sorry Steve, but I may need help on that.

~~Could you please post the code?~~

Oh, ok.

Got ya.

So I have to return a message then if `skip` is returned, it is skipped.  
I may just go back to the `link in` and `link out` nodes.

Thanks.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 June 2022 10:53 UTC](https://discourse.nodered.org/t/help-with-link-call-getting-errors/63667/4 "2022-06-09T10:53:14Z")

</div>

> [@Trying\_to\_learn](#):
>
> I may just go back to the `link in` and `link out` nodes

Link in link out cannot (easily) create re-usable flows

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [9 June 2022 10:54 UTC](https://discourse.nodered.org/t/help-with-link-call-getting-errors/63667/5 "2022-06-09T10:54:58Z")

</div>

This wasn't for multiple use.

I needed to stick some stuff in the middle of some stuff and real estate was scarce.  
I thought to use the `link call` to just take a short cut.

I guess I asked for it by trying to take an easy way out.

But thanks for explaining that part.

---

<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:** [23 June 2022 10:55 UTC](https://discourse.nodered.org/t/help-with-link-call-getting-errors/63667/6 "2022-06-23T10:55:45Z")

</div>

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