Open
Description
@Post()
async post(@Body() userDTO: SignUpDTO): Promise<InsertResult> {
try {
return await this.usersService.createUser(
EntityMapper.mapTo(User, userDTO)
);
} catch (error: any) {
throw new BadRequestError(
error.detail ?? error.message ?? ErrorsMessages.INTERNAL_SERVER_ERROR
);
}
}
This shouldnt have the try catch and delegate the responsability to the service.
Metadata
Metadata
Assignees
Labels
No labels