mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 12:35:02 +02:00
UBERF-8433: Support for archived workspaces (#6937)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -42,7 +42,13 @@ import core, {
|
||||
toFindResult,
|
||||
type MeasureContext
|
||||
} from '@hcengineering/core'
|
||||
import { PlatformError, UNAUTHORIZED, broadcastEvent, getMetadata, unknownError } from '@hcengineering/platform'
|
||||
import platform, {
|
||||
PlatformError,
|
||||
UNAUTHORIZED,
|
||||
broadcastEvent,
|
||||
getMetadata,
|
||||
unknownError
|
||||
} from '@hcengineering/platform'
|
||||
|
||||
import { HelloRequest, HelloResponse, RPCHandler, ReqId, type Response } from '@hcengineering/rpc'
|
||||
|
||||
@@ -241,7 +247,12 @@ class Connection implements ClientConnection {
|
||||
Analytics.handleError(new PlatformError(resp.error))
|
||||
this.closed = true
|
||||
this.websocket?.close()
|
||||
this.opt?.onUnauthorized?.()
|
||||
if (resp.error?.code === UNAUTHORIZED.code) {
|
||||
this.opt?.onUnauthorized?.()
|
||||
}
|
||||
if (resp.error?.code === platform.status.WorkspaceArchived) {
|
||||
this.opt?.onArchived?.()
|
||||
}
|
||||
}
|
||||
console.error(resp.error)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user