realm
Version:
Realm by MongoDB is an offline-first mobile database: an alternative to SQLite and key-value stores
88 lines • 2.63 kB
TypeScript
import { Configuration, PrimaryKey } from "./internal";
export declare class AssertionError extends Error {
}
export declare class TypeAssertionError extends AssertionError {
}
export declare class IllegalConstructorError extends Error {
constructor(type: string);
}
export declare class TimeoutError extends Error {
constructor(message: string);
}
export declare class SchemaParseError extends Error {
}
export declare class ObjectSchemaParseError extends SchemaParseError {
objectName: string;
}
export declare class PropertySchemaParseError extends SchemaParseError {
objectName: string;
propertyName: string;
}
/**
* An class describing a sync error.
*/
export declare class SyncError extends Error {
name: string;
isOk: boolean;
/**
* The error code that represents this error.
*/
code?: number;
/**
* The category of this error.
* @deprecated
*/
category: string;
reason?: string;
/**
* The URL to the associated server log, if available. The string will be empty
* if the sync error is not initiated by the server.
*/
logUrl: string;
/**
* A record of extra user information associated with this error.
*/
userInfo: Record<string, string>;
/**
* @deprecated Check the error message instead.
*/
isFatal: boolean;
}
/**
* @deprecated Use the another {@link ClientResetMode} than {@link ClientResetMode.Manual}.
* @see https://github.com/realm/realm-js/blob/main/CHANGELOG.md#1110-2022-11-01
* @see https://github.com/realm/realm-js/issues/4135
*/
export declare class ClientResetError extends SyncError {
name: string;
config: Configuration;
}
/**
* An error class that indicates that one or more object changes have been reverted by the server.
* This can happen when the client creates/updates objects that do not match any subscription, or performs writes on
* an object it didn't have permission to access.
*/
export declare class CompensatingWriteError extends SyncError {
/**
* The array of information about each object that caused the compensating write.
*/
writes: CompensatingWriteInfo[];
}
/**
* The details of a compensating write performed by the server.
*/
export type CompensatingWriteInfo = {
/**
* The type of the object that caused the compensating write.
*/
objectName: string;
/**
* The reason for the compensating write.
*/
reason: string;
/**
* The primary key of the object that caused the compensating write.
*/
primaryKey: PrimaryKey;
};
//# sourceMappingURL=errors.d.ts.map