We run a continuous payments stream that receives fairly useless errors on the regular and would like to know what these may stem from and if they can be disregarded. I haven't been able to correlate these errors with error logs on our Horizon server. Below is the error being logged in node.js via the onerror
callback:
Event { type: 'error', message: undefined }
Below is the source code that is triggering this error event:
server
.payments()
.cursor('now')
.stream({
onerror: (error) => {
if (error.messaged !== undefined) {
console.log(error);
}
},
onmessage: (payment) => {
if (payment.type_i !== 1) {
return;
}
// ... code to handle payment ...
}
});
Just to reiterate my question(s):
- Why are we getting these errors from the stream?
- Are these errors something we should be worried about?
- How do we stop receiving these errors?