Skip to content

Best practice for error parsing #8774

@alfille

Description

@alfille

Issue

How to parse the "catch" objects?

Info

  • Environment: Browser
  • Platform: All
  • Adapter: probably indexeddb
  • Server: CouchDB

Reproduce

Briefly, in my application (https://emissionsystem.org) which uses straight javascript, pouchdb, and a couchdb server (albeit with SSL), I try to follow good practice and use a catch clause in all my pouchdb promises. Example:

db.get("patient").
.then(.....)
.catch(err => process(err))

Is there a consistent format for "err"? Sometimes I see err.message for a text description, but I'm not sure it's a pervasive pattern.

My hope is to provide useful feedback to users and make my application more robust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions