diff --git a/packages/hoppscotch-backend/src/shortcode/shortcode.service.ts b/packages/hoppscotch-backend/src/shortcode/shortcode.service.ts index 8c41a185c..f5bfb075b 100644 --- a/packages/hoppscotch-backend/src/shortcode/shortcode.service.ts +++ b/packages/hoppscotch-backend/src/shortcode/shortcode.service.ts @@ -126,7 +126,7 @@ export class ShortcodeService implements UserDataHandler, OnModuleInit { return E.left(SHORTCODE_INVALID_REQUEST_JSON); const parsedProperties = stringToJson(properties); - if (E.isLeft(parsedProperties)) + if (E.isLeft(parsedProperties) || !parsedProperties.right) return E.left(SHORTCODE_INVALID_PROPERTIES_JSON); const generatedShortCode = await this.generateUniqueShortCodeID();