Spaces:
Running
Running
| export class ConflictError extends Error { | |
| constructor( | |
| public readonly entityId: string, | |
| public readonly currentVersion: number | |
| ) { | |
| super(`Entity ${entityId} was modified (current version ${currentVersion})`); | |
| this.name = 'ConflictError'; | |
| } | |
| } | |
| export class NotFoundError extends Error { | |
| constructor(public readonly entityId: string) { | |
| super(`Entity ${entityId} not found`); | |
| this.name = 'NotFoundError'; | |
| } | |
| } | |
| export class ReadOnlyError extends Error { | |
| constructor() { | |
| super('The app is in read-only mode: another instance holds the writer lock'); | |
| this.name = 'ReadOnlyError'; | |
| } | |
| } | |