"Couldn't send asynchronously" error
Closed this issue · 2 comments
Hi team,
Occasionnaly, our PHP service is wrapping errors with:
<br/><br/><strong>Raygun Warning:</strong> Couldn't send asynchronously. Try calling new RaygunClient('apikey', FALSE); to use an alternate sending method, or RaygunClient('key', FALSE, TRUE) to echo the HTTP response<br/><br/>
-
Do you know why this is occurring occasionally? We are sending our errors asynchronously to Raygun and would like to continue to do so. It looks like a socket connection couldn't be opened, but that's all we know...
-
Because of this wrapping from our PHP service, our Go service getting the errors is unable to parse them (it expect some JSON:
Failed to unmarshal json: invalid character '<' looking for beginning of value
). Is there a way to avoid this behaviour?
Thanks for your help!
Hi @ltachet,
This string will be appended to the error message if the $debug
flag is set to true. This is the third parameter in the RaygunClient()
constructor (see the documentation here). This isn't very clearly described in the docs, but $debug
should only ever be set to true in a development environment.
This is also from the older version of the provider (v1.8), I'd recommend updating to the latest version (v2.0) if possible.
Regards,
Sam
It sounds as if this is resolved. Please feel free to reopen if not @ltachet! Thanks