From 9d24e911c0b69516d61b9beb38dc014f09d9236f Mon Sep 17 00:00:00 2001 From: Lucio Franco Date: Mon, 30 Oct 2023 12:29:38 -0700 Subject: [PATCH 1/2] Error on http sync --- src/http.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/http.ts b/src/http.ts index d6f304e..b6ef5c5 100644 --- a/src/http.ts +++ b/src/http.ts @@ -136,6 +136,8 @@ export class HttpClient implements Client { } sync(): Promise { + throw new LibsqlError("sync not supported in http mode"); + return Promise.resolve(); } From 264ff44e7583635c2617193db3efbc90b8edee07 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 1 Nov 2023 09:38:21 +0000 Subject: [PATCH 2/2] Fix invalid use of LibsqlError --- src/http.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/http.ts b/src/http.ts index b6ef5c5..c1b6bd8 100644 --- a/src/http.ts +++ b/src/http.ts @@ -136,9 +136,7 @@ export class HttpClient implements Client { } sync(): Promise { - throw new LibsqlError("sync not supported in http mode"); - - return Promise.resolve(); + throw new LibsqlError("sync not supported in http mode", "SYNC_NOT_SUPPORTED"); } close(): void {