diff --git a/src/components/error-response-presenter.ts b/src/components/error-response-presenter.ts index 9aa9904b..bd368e19 100644 --- a/src/components/error-response-presenter.ts +++ b/src/components/error-response-presenter.ts @@ -617,6 +617,15 @@ export default (error: AppError | DBError) => { }, }; } + case US_ERRORS.MOVE_TENANT_CONTENT_DENIED: { + return { + code: 403, + response: { + code, + message: message ?? 'Move tenant content denied', + }, + }; + } default: return { code: 500, diff --git a/src/const/us-error-constants.ts b/src/const/us-error-constants.ts index 8ed8fbc9..d311d8b8 100644 --- a/src/const/us-error-constants.ts +++ b/src/const/us-error-constants.ts @@ -88,6 +88,7 @@ const US_ERRORS = { ENTRY_IS_NOT_IN_WORKBOOK: 'ENTRY_IS_NOT_IN_WORKBOOK', UNKNOWN_OPERATION_TYPE: 'UNKNOWN_OPERATION_TYPE', IAM_OPERATION_NOT_EXISTS: 'IAM_OPERATION_NOT_EXISTS', + MOVE_TENANT_CONTENT_DENIED: 'MOVE_TENANT_CONTENT_DENIED', }; export const ERROR_BY_DLS_STATUS_CODE: {[key: number]: string} = { diff --git a/src/services/entry/actions/copy-to-workbook.ts b/src/services/entry/actions/copy-to-workbook.ts index 78abab82..d6684db1 100644 --- a/src/services/entry/actions/copy-to-workbook.ts +++ b/src/services/entry/actions/copy-to-workbook.ts @@ -68,7 +68,7 @@ export const copyToWorkbook = async (ctx: CTX, params: Params) => { logInfo(ctx, 'COPY_ENTRY_TO_WORKBOOK_CALL', { entryIds: entryIds.map((entryId) => Utils.encodeId(entryId)), - destinationWorkbookId, + destinationWorkbookId: Utils.encodeId(destinationWorkbookId), tenantIdOverride, });