Skip to content

Bug: Getting 409 Error for CustomPouchError with pouchdb-browser #33461

Open
@umakant-prismhr

Description

@umakant-prismhr

React version:
17.0.2

Steps To Reproduce

  1. Calling this code giving exception -

  2. updateCompanyConfiguration({
    _rev:
    companyConfigurations && companyConfigurations._rev
    ? companyConfigurations._rev
    : "",
    ...$_companyConfiguration,
    })
    .then((response) => {
    if (response.ok) {
    console.log(response);
    }
    })
    .catch((error) => {
    console.log(error);
    });

  3. Code is giving exception-
    export function updateCompanyConfiguration(doc) {
    let _rev = doc._rev;
    delete doc._rev;
    return companyConfigurationDB.put({
    _id: "1",
    _rev: _rev,
    ...doc,
    });
    }

  4. Exception
    Exception: at new CustomPouchError (http://localhost:3000/static/js/vendors~main.chunk.js:162322:20)
    at createError (http://localhost:3000/static/js/vendors~main.chunk.js:162331:10)
    at updateDoc (http://localhost:3000/static/js/vendors~main.chunk.js:165828:15)
    at nextDoc (http://localhost:3000/static/js/vendors~main.chunk.js:165927:9)
    at http://localhost:3000/static/js/vendors~main.chunk.js:165936:5
    at Map.forEach ()
    at processDocs (http://localhost:3000/static/js/vendors~main.chunk.js:165913:13)
    at idbProcessDocs (http://localhost:3000/static/js/vendors~main.chunk.js:166255:5)
    at checkDone (http://localhost:3000/static/js/vendors~main.chunk.js:166273:9)
    at IDBRequest.readMetadata (http://localhost:3000/static/js/vendors~main.chunk.js:166281:7)

Image

Link to code example:

The current behavior

The expected behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions