This commit is contained in:
boufni95 2025-03-10 20:17:06 +00:00
parent ef811e4bf5
commit 26921c163b

View file

@ -131,9 +131,11 @@ export class StorageInterface extends EventEmitter {
}
private handleOp<T>(op: IStorageOperation): Promise<T> {
console.log('handleOp', op)
this.checkConnected()
return new Promise<T>((resolve, reject) => {
const responseHandler = (response: OperationResponse<T>) => {
console.log('responseHandler', response)
if (!response.success) {
reject(new Error(response.error));
return