mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-09 09:20:54 +00:00
QFIX: Remove duplicate handler errors (#9084)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
91e72d98fc
commit
6bd8fff00b
@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { Analytics } from '@hcengineering/analytics'
|
||||
import type { Doc, PropertyType } from './classes'
|
||||
import type { Position, PullArray, QueryUpdate } from './tx'
|
||||
|
||||
@ -43,7 +44,12 @@ function $push (document: Doc, keyval: Record<string, PropertyType>): void {
|
||||
if (doc[key] === null || doc[key] === undefined) {
|
||||
doc[key] = [kvk]
|
||||
} else {
|
||||
doc[key].push(kvk)
|
||||
if (Array.isArray(doc[key])) {
|
||||
doc[key].push(kvk)
|
||||
} else {
|
||||
Analytics.handleError(new Error(`invalid array value: ${JSON.stringify(doc[key])} `))
|
||||
doc[key] = [kvk]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { Analytics } from '@hcengineering/analytics'
|
||||
import {
|
||||
toFindResult,
|
||||
type Class,
|
||||
@ -118,7 +117,6 @@ export class PresentationPipelineImpl implements PresentationPipeline {
|
||||
return toFindResult([], -1)
|
||||
}
|
||||
}
|
||||
Analytics.handleError(err as Error)
|
||||
const status = unknownError(err)
|
||||
await setPlatformStatus(status)
|
||||
return toFindResult([], -1)
|
||||
@ -144,7 +142,6 @@ export class PresentationPipelineImpl implements PresentationPipeline {
|
||||
return
|
||||
}
|
||||
}
|
||||
Analytics.handleError(err as Error)
|
||||
const status = unknownError(err)
|
||||
await setPlatformStatus(status)
|
||||
}
|
||||
@ -178,7 +175,6 @@ export class PresentationPipelineImpl implements PresentationPipeline {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
Analytics.handleError(err as Error)
|
||||
const status = unknownError(err)
|
||||
await setPlatformStatus(status)
|
||||
return {}
|
||||
|
@ -318,7 +318,12 @@ class Connection implements ClientConnection {
|
||||
|
||||
if (resp.error !== undefined) {
|
||||
if (resp.error?.code === UNAUTHORIZED.code || resp.terminate === true) {
|
||||
Analytics.handleError(new PlatformError(resp.error))
|
||||
if (
|
||||
resp.error.code !== platform.status.WorkspaceArchived ||
|
||||
resp.error.code !== platform.status.WorkspaceNotFound
|
||||
) {
|
||||
Analytics.handleError(new PlatformError(resp.error))
|
||||
}
|
||||
this.closed = true
|
||||
this.websocket?.close()
|
||||
if (resp.error?.code === UNAUTHORIZED.code) {
|
||||
|
@ -284,7 +284,6 @@ async function fileUploadCallback (space: Ref<Drive>, parent: Ref<Folder>): Prom
|
||||
Analytics.handleEvent(DriveEvents.FileUploaded, { ok: true, type: file.type, size: file.size, name })
|
||||
} catch (err) {
|
||||
void setPlatformStatus(unknownError(err))
|
||||
Analytics.handleEvent(DriveEvents.FileUploaded, { ok: false, name })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,6 @@
|
||||
}
|
||||
)
|
||||
} catch (err: any) {
|
||||
Analytics.handleError(err)
|
||||
setPlatformStatus(unknownError(err))
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +163,6 @@
|
||||
}
|
||||
)
|
||||
} catch (err: any) {
|
||||
Analytics.handleError(err)
|
||||
setPlatformStatus(unknownError(err))
|
||||
}
|
||||
}
|
||||
|
@ -483,7 +483,6 @@
|
||||
|
||||
await recognize(file)
|
||||
} catch (err: any) {
|
||||
Analytics.handleError(err)
|
||||
setPlatformStatus(unknownError(err))
|
||||
} finally {
|
||||
loading = false
|
||||
|
@ -61,7 +61,7 @@
|
||||
else {
|
||||
allWidth = 0
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (elements[i].clientWidth !== undefined && allWidth < elements[i].clientWidth) {
|
||||
if (elements[i]?.clientWidth !== undefined && allWidth < elements[i]?.clientWidth) {
|
||||
allWidth = elements[i].clientWidth
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user