This commit is contained in:
Andras Schmelczer 2025-12-03 23:24:53 +00:00
parent 2607bc5213
commit 564d4a6c37

View file

@ -78,8 +78,8 @@ export class SyncService {
const result: SerializedError | DocumentVersionWithoutContent = const result: SerializedError | DocumentVersionWithoutContent =
(await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion (await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
| SerializedError | SerializedError
| DocumentVersionWithoutContent; | DocumentVersionWithoutContent;
if ("errorType" in result) { if ("errorType" in result) {
throw new Error( throw new Error(
@ -88,7 +88,8 @@ export class SyncService {
} }
this.logger.debug( this.logger.debug(
`Created document ${JSON.stringify(result)} with id ${result.documentId `Created document ${JSON.stringify(result)} with id ${
result.documentId
}` }`
); );
@ -129,8 +130,8 @@ export class SyncService {
const result: SerializedError | DocumentUpdateResponse = const result: SerializedError | DocumentUpdateResponse =
(await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion (await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
| SerializedError | SerializedError
| DocumentUpdateResponse; | DocumentUpdateResponse;
if ("errorType" in result) { if ("errorType" in result) {
throw new Error( throw new Error(
@ -139,7 +140,8 @@ export class SyncService {
} }
this.logger.debug( this.logger.debug(
`Updated document ${JSON.stringify(result)} with id ${result.documentId `Updated document ${JSON.stringify(result)} with id ${
result.documentId
}}` }}`
); );
@ -181,8 +183,8 @@ export class SyncService {
const result: SerializedError | DocumentUpdateResponse = const result: SerializedError | DocumentUpdateResponse =
(await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion (await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
| SerializedError | SerializedError
| DocumentUpdateResponse; | DocumentUpdateResponse;
if ("errorType" in result) { if ("errorType" in result) {
throw new Error( throw new Error(
@ -191,7 +193,8 @@ export class SyncService {
} }
this.logger.debug( this.logger.debug(
`Updated document ${JSON.stringify(result)} with id ${result.documentId `Updated document ${JSON.stringify(result)} with id ${
result.documentId
}}` }}`
); );
@ -221,8 +224,8 @@ export class SyncService {
const result: SerializedError | DocumentVersionWithoutContent = const result: SerializedError | DocumentVersionWithoutContent =
(await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion (await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
| SerializedError | SerializedError
| DocumentVersionWithoutContent; | DocumentVersionWithoutContent;
if ("errorType" in result) { if ("errorType" in result) {
throw new Error( throw new Error(
@ -282,8 +285,8 @@ export class SyncService {
const result: SerializedError | FetchLatestDocumentsResponse = const result: SerializedError | FetchLatestDocumentsResponse =
(await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion (await response.json()) as // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
| SerializedError | SerializedError
| FetchLatestDocumentsResponse; | FetchLatestDocumentsResponse;
if ("errorType" in result) { if ("errorType" in result) {
throw new Error( throw new Error(