src/app/core/database/pouchdb/database-errors.ts
A write was rejected because the document has changed in the meantime (409).
No results matching.
Properties |
|
constructor(message: string, options?: TypedErrorOptions)
|
|||||||||
|
Parameters :
|
| Readonly classification |
Type : ErrorClassification
|
|
Inherited from
TypedError
|
|
The kind of failure: an own property, so that a copy of the error that lost
its class (as PouchDB's |
| Readonly Optional status |
Type : number
|
|
Inherited from
TypedError
|
|
The HTTP status of the failed request, if any. |
| Readonly Optional details |
Type : Record<string, unknown>
|
|
Inherited from
NamedError
|
|
Context for the report, kept out of the message so that it does not split the issue. |
import {
TypedError,
TypedErrorOptions,
} from "../../logging/error-classification";
/**
* The typed errors of the database: converted from PouchDB's and IndexedDB's
* raw errors by `toTypedDatabaseError` (see `pouchdb-errors.ts`), a write
* conflict also by the HTTP interceptor.
*/
/** A write was rejected because the document has changed in the meantime (409). */
export class WriteConflictError extends TypedError {
constructor(message: string, options?: TypedErrorOptions) {
super("WriteConflictError", "write-conflict", message, options);
}
}
/** The device's local database (IndexedDB underneath PouchDB) is broken. */
export class LocalStorageError extends TypedError {
constructor(message: string, options?: TypedErrorOptions) {
super("LocalStorageError", "local-storage", message, options);
}
}