diff --git a/src/api/user/user.controller.ts b/src/api/user/user.controller.ts index 748e58b..ae9cd4a 100644 --- a/src/api/user/user.controller.ts +++ b/src/api/user/user.controller.ts @@ -409,8 +409,12 @@ export class UserController { @Query('handle') handle: string, ): Promise { this.logger.log(`Validating handle: ${handle}`); - if (!handle) { - throw new BadRequestException('Handle is required.'); + if ( + !handle || + typeof handle !== "string" || + (Array.isArray(handle)) + ) { + throw new BadRequestException('Handle is required and must be a string.'); } return this.validationService.validateHandle(handle); }