Comments (3)
I have the same question. CMIIW, @dominicbarnes, but the error handling seems logically unsound. Calling track
n-times, there's no way to determine which subset of track
calls failed when the batch fails because all the track callbacks are called with the single batch call error. The batch method documentation contains no information about the response... does it fail all if one fails? Are payloads partially accepted?
I suppose we need to error-handle every individual call, and we won't know which specific calls failed. I suppose turning off automatic batching would help error handling but sacrifice performance.
from analytics-node.
I agree with @thesmart, the error handling of tracking methods (identify()
, track()
, etc) doesn't make much sense to me. While we could easily add flush
event, I'm not sure what purpose would it serve. I'd expect analytics library to handle tracking/sending errors by itself. E.g. if flush()
fails, I'd expect it to reschedule the flush and retry. But I wouldn't want to handle that logic manually.
@conorgil could you share more about your use case and what do you want to achieve with error
and flush
events? It would make it easier to understand the benefit of having those events.
from analytics-node.
Closing due to lack of response. If issue isn't resolved, feel free to reply and I'll reopen it.
from analytics-node.
Related Issues (20)
- Bad Request (400) when batching HOT 1
- Flush on first message should be explicit configurable HOT 1
- analytics-node might cause an unhandledRejection HOT 13
- Should we switch to the `@segmentio/analytics-next` package? HOT 2
- Unhandled Promise Rejection Can Crash App HOT 10
- What does calling identify on the server actually do? HOT 5
- Areas for Performance Improvements
- Chrome extension background service worker + analytics-node = fail HOT 1
- Resolve vulnerability axios 0.21.4 HOT 2
- Including sentAt in the event payload of /v1/batch request makes specified timestamp ignored
- Not all sent 'track' events receive to the debugger tab of the source HOT 4
- Npm version update for Axios Version update HOT 1
- Support for other backend JS runtimes (Web Workers, Deno) HOT 6
- Support middleware functions HOT 8
- Typescript support HOT 6
- Cross-Domain Misconfiguration HOT 6
- `Analytics` intialization doesn't catch invalid/non-existent write key HOT 2
- Update axios to `1.6.0` to make it possible to get a security fix HOT 2
- Track call fails when property has bigint attribute
- context.device.token ignored HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from analytics-node.