From de1fe0b31351997d75852be0bfa7b13788eba231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cosmin=20P=C3=A2rvulescu?= Date: Fri, 19 Jan 2024 16:19:03 +0200 Subject: [PATCH] fix(cicd): linter errors (#2814) --- platform/object/src/jsonrpc/methods/putObject.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/object/src/jsonrpc/methods/putObject.ts b/platform/object/src/jsonrpc/methods/putObject.ts index 730cab5b73..b231d97610 100644 --- a/platform/object/src/jsonrpc/methods/putObject.ts +++ b/platform/object/src/jsonrpc/methods/putObject.ts @@ -5,6 +5,7 @@ import { initObjectNodeByName } from '../../nodes' import { Visibility } from '../../types' import { getBaseKey, getObjectKey } from '../../utils' +import { InternalServerError } from '@proofzero/errors' export const PutObjectInput = z.object({ namespace: z.string(), @@ -50,6 +51,11 @@ export const putObjectMethod = async ({ JSON.stringify(value) ) await node.class.set(index.version, index.visibility) + if (!metadata) { + throw new InternalServerError({ + message: 'Metadata is null', + }) + } return { size: metadata.size, version: index.version,