Mid-Level
October 4, 2026

Spot the bug: Node.js / NestJS

One snippet. Find the bug, or prove there isn't one.

typescript
1import { Controller, Post, Body, HttpCode } from '@nestjs/common'
2import { ProductService } from './product.service'
3import { CreateProductDto } from './dto/create-product.dto'
4
5@Controller('products')
6export class ProductController {
7  constructor(private readonly productService: ProductService) {}
8
9  @Post()
10  @HttpCode(200)
11  async create(@Body() dto: CreateProductDto) {
12    const product = await this.productService.create(dto)
13    return product
14  }
15}

Click the lines that carry the problem.

Your verdict

One attempt per day. The answer shows up right after.

Keep your streak

Create an account to keep your streak and track your progress.

Create an account