akiomik / akiomik/nosvelte

useReq() writes to console.error unconditionally

Open Beginner friendly
#85 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
29
Forks
3
Avg merge
3h 5m
Merged PRs (30d)
11

Description

`useReq()` logs every stream error to the console unconditionally
(`src/lib/stores/useReq.ts:88-89`):

```ts
error: (e) => {
console.error(e);
```

This is library-side logging with no way for a consumer to opt out, and with
`retry` at its default of 3 it fires once per attempt. A library should not write to
the host application's console without being asked to.

Determined by code reading.

## Direction

Remove it, or route it through an opt-in diagnostics channel that the consumer
subscribes to.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/lib/stores/useReq.ts at lines 88-89 and read how the stream error callback interacts with the default retry count. Done means useReq() no longer writes errors to the host console unconditionally, either by removing that logging or by exposing the issue through an opt-in diagnostics channel.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.