Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

improve diagnostics when unique index constraint is violated #1

Open
jschilli opened this issue Mar 25, 2015 · 3 comments
Open

improve diagnostics when unique index constraint is violated #1

jschilli opened this issue Mar 25, 2015 · 3 comments

Comments

@jschilli
Copy link
Owner

No description provided.

@Ramblurr
Copy link

Is this issue related to this error?

version: 2.4.2
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: searchIndex.name, searchIndex.type, searchIndex.path
    at Error (native)

Is there a workaround?

@jschilli
Copy link
Owner Author

It's been a while since I looked at this.

My recollection is that you can turn on verbose output which should point some additional detail

add verbose: true to your options

Happy to help, but little context to go on here

@Ramblurr
Copy link

I worked around the issue for now by adding OR IGNORE to the insert statement. It looks like this mostly affects attributes and properties that have common names (e.g., name). This is ok as I mainly want the class documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants