question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors from Pouch are swallowed

See original GitHub issue

Hi!

Great work on this library, but I think I found an issue.

If you pass some parameter to useFind that causes Pouch to throw an error (my problem was I asked to sort on a column that has no index), this error is swallowed and never shows up in the console. I had to step deep into the code stack to eventually find the error:

Unhandled promise rejection Error: "Cannot sort on field(s) "firstName" when using the default index"
    validateSort index-browser.es.js:501
    1 index-browser.es.js:1216
    run es.promise.js:97
    notify es.promise.js:114
    flush microtask.js:25
    argsArray index.js:18
    _callee$ useFind.js:55
    tryCatch runtime.js:45
    invoke runtime.js:271
    method runtime.js:97
    asyncGeneratorStep asyncToGenerator.js:3
    _next asyncToGenerator.js:25
    run es.promise.js:97
    notify es.promise.js:114
    flush microtask.js:25

The result of this is that useFind() returns undefined and you never know there was a problem. Now that I know the problem I can sort out my index, but the issue I am reporting is that react-pouchdb swallows errors from Pouch.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ArnoSainecommented, Aug 14, 2019

Fixed in 2.0.0 🎉

0reactions
ArnoSainecommented, Aug 2, 2019

Ok, no worries 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Zenker's Diverticulum: Symptoms and Treatment - WebMD
Zenker's diverticulum is a pouch that can form at the back of your throat. If it's left untreated, food and saliva can become...
Read more >
What happens if you swallow a ZYN pouch? - Quora
Zyn pouches are not for swallowing but only oral use in the mouth. I think if it is swallowed, there would be similar...
Read more >
Dysphagia - Symptoms and causes - Mayo Clinic
A small pouch that forms and collects food particles in the throat, often just above the esophagus, leads to difficulty swallowing, ...
Read more >
Zenker's Diverticulum Causes, Symptoms, & Treatment
Zenker's Diverticulum – a sac or pouch in the back of the throat which causes difficulty swallowing by collecting and retaining food and...
Read more >
Anatomy and Physiology of Feeding and Swallowing - NCBI
Eating and swallowing are complex behaviors involving volitional and reflexive activities of more than 30 nerves and muscles.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found