Wrap all calls to Segment API in try/catch
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 88
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I've got from API call:
```
getaddrinfo EAI_AGAIN api.segment.io api.segment.io:443
at ClientRequest. (/app/node_modules/node-fetch/index.js:133:11)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.socketErrorListener (_http_client.js:401:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)]
```
Somewhere call to Segment is not wrapped in try catch, need to check everywhere.
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
Search the TypeScript codebase for every call to the Segment API and inspect how each handles rejected requests. Use the reported getaddrinfo EAI_AGAIN failure as the error case, then verify that all Segment calls are wrapped in try/catch handling without leaving unhandled errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100