Raygun and sagas
andreea
Posted on
Jul 09 2020
Hello,
I am having some issues sending custom errors to Raygun client from sagas. Looks like the call is completely ignored and no request is made to Raygun.
This is an example of the code I am using:
export function* sendAnalyticsSaga() {
console.log('SEND_ANALYTICS')
yield rg4js('send', {
error: new Error('SEND_ANALYTICS!'),
tags: 'OPP',
})
}
And at some point I call this saga, the "SEND_ANALYTICS" text gets printed but the message never arrives to Raygun.
Thanks in advance for your help.
Benjamin
Raygun
Posted on
Jul 09 2020
Hi andreea,
Thanks for getting in touch.
I don't think you need the yield
call before the send
method, but even with it there I do not see a reason why the error would not be sent to Raygun.
We actually log errors in sagas ourselves, so I think that something else is stopping the error from being sent.
Checking that your API key is configured and Crash Reporting is enabled on the page you are testing would be my next recommendations (I'm assuming you already have checked this but it's always good to double check).
Once you've confirmed the above, if you could visit our Contact page and click the "Support" link to send us a message I'll be able to debug the issue further with you.
Thanks, Ben