PouchDB Database Detected Unknown Error

I get a "Database with unknown error" message when replicating data from couchDB database. It starts to replicate, downloads several documents, and then some documents cannot be played. I can’t tell you exactly why this is happening.

CustomPouchError {status: 500, name: "unknown_error", message: "The database encountered an unknown error", error: true, result: Object}

+5
source share
1 answer

There could be many reasons:

But my final solution used the retry option in replication ( https://pouchdb.com/api.html#replication ), forcing me to retry in the event of a failure

PouchDB.replicate(localDB, baseRemoteDB, { live: true, retry: true, timeout: false } ) 

As a result, replication is suspended every two documents (instead of stopping with an unknown error), and it resumes after a few moments, starting from the first new document. Response time can also be set using the snooze function (see previous document)

0
source

Source: https://habr.com/ru/post/1239296/


All Articles