Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS] Add error code mapping in JS wrapper #100

Open
TimoGlastra opened this issue Feb 21, 2023 · 0 comments
Open

[JS] Add error code mapping in JS wrapper #100

TimoGlastra opened this issue Feb 21, 2023 · 0 comments

Comments

@TimoGlastra
Copy link
Member

TimoGlastra commented Feb 21, 2023

Currently it just gives you the code. I think we could add this enum (or make it an object mapping)

export enum AskarError {
  Success = 0,

  /// An unexpected error from the store backend
  Backend = 1,

  /// The store backend was too busy to handle the request
  Busy = 2,

  /// An insert operation failed due to a unique key conflict
  Duplicate = 3,

  /// An encryption or decryption operation failed
  Encryption = 4,

  /// The input parameters to the method were incorrect
  Input = 5,

  /// The requested record was not found
  NotFound = 6,

  /// An unexpected error occurred
  Unexpected = 7,

  /// An unsupported operation was requested
  Unsupported = 8,

  /// A custom error type for external integrations
  Custom = 100,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant