axiomhq / axiom-js

Official language bindings and library extensions for Axiom
https://axiom.co
MIT License
87 stars 14 forks source link

Server keep crashing #139

Closed tuhinpal closed 6 months ago

tuhinpal commented 6 months ago

Hi! I was trying to give wrong API key and check what happened, the server keep crashing with error. I am using @axiomhq/js and use batch ingest method.

Error: Forbidden
    at FetchClient.doReq (C:\Users\tuhin\OneDrive\Desktop\Code-Visadb\ai-reels-render\node_modules\@axiomhq\src\fetchClient.ts:42:29)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Batch.flush (C:\Users\tuhin\OneDrive\Desktop\Code-Visadb\ai-reels-render\node_modules\@axiomhq\src\batch.ts:61:17)

Is there any implemented error boundary which prevent app from crashing in any unwanted situations like, axiom server down?

schehata commented 6 months ago

I am working on handling those exception now, finalizing the PR.

schehata commented 6 months ago

we have a released a new version of axiom-js and axiom-pino that would solve the exceptions handling in axiom-js. on Monday we will continue investigating Pino package and add some tests to ensure that doesn't happen again. let us know if this works our for you, and if there is any thing we can improve on the new onError() method.

tuhinpal commented 6 months ago

Thanks! closing...