Azure / Azure/cosmos-explorer

Prohibit "JSON.stringify(error)"

Open
#21 0 comments 0 reactions 0 assignees View on GitHub
bug lint
Dominant language
TypeScript
Stars
131
Forks
67
Avg merge
3d 13h
Merged PRs (30d)
10

Description

Frequently we see errors logged in the notifications bad that look like `"{}"`. This is because we are using `JSON.stringify(error)` in many places. Instances of `Error` have no enumerable properties which is the reason for this behavior. We should add a custom linting rule or type changes to prohibit using `JSON.stringify(error)`.

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; start by locating the many JSON.stringify(error) usages described in the repository, including those producing "{}" in the notifications bar. Decide whether a custom linting rule or type changes best prohibits the pattern, and consider the work done when such usage is prevented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.