DavidWells / DavidWells/analytics
Improve error handling
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Hi !
I have written a custom plugin for my project. It seems that when the track plugin method throws/rejects the Analytics.track method never resolve nor reject (=> in other words, my unit test times out).
Rather than forwarding rejection to the Analytics.track (We often assume that logging, sending analytics is a failsafe operation) I would suggest to implement an 'error' event that could make possible to log somewhere (console, logger, etc).
Thanks in advance !
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Analytics.track through the plugin track method and the promise handling described in the issue, then inspect the existing unit tests that cover tracking failures. Clarify how an error event should be exposed and what happens when a plugin throws or rejects; done means the operation no longer hangs and the failure is observable through the agreed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100