localForage / localForage/localForage

Invalid use of reject causing real error to be swallowed

Open
#822 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
25.8k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

The "onabort" handler of indexedDB transaction
https://github.com/localForage/localForage/blob/b6a47080ba946e3ca659c1d7358a04521440e5cf/src/drivers/indexeddb.js#L668-L671

is throwing following error
```
Uncaught Error: The error you provided does not contain a stack trace.
at parseError (index.js:2370)
at getStackFrames (index.js:2263)
at crashWithFrames (index.js:1927)
at index.js:1945
at rejectionHandler (index.js:2041)
```

when getting DOMException
```
DOMException
code: 22
message: ""
name: "QuotaExceededError"
__proto__: DOMException
```

Contributor guide

Open the contributing guide

Research direction

Start in src/drivers/indexeddb.js at the onabort handler around lines 668-671 and reproduce the QuotaExceededError DOMException described in the issue. Trace how the rejection is handled and confirm that the real IndexedDB error is preserved rather than swallowed or replaced by the missing-stack-trace error. Done means the original error remains observable when the transaction aborts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.