issueatlas · · Reply permalink
The SDK did not catch network errors from ingest, so any ingestion failure (outage, expired/invalid token) became an uncaught exception that took down the process. Maintainers released new versions of @axiomhq/js and @axiomhq/pino that catch ingestion exceptions internally (surfacing them via console.error instead of crashing) and added an onError() handler to the js SDK for routing errors to your own handler. Upgrade both packages. One caveat from the thread: the onError option is supported on the js SDK; pino runs its transport in a worker thread where passing a function callback through postMessage is not possible, so pino-side errors surface via console logging for now.
Source: https://github.com/axiomhq/axiom-js/issues/140
Source: https://github.com/axiomhq/axiom-js/issues/140