title: Express delete working but gives not found error
body: <p>I am using <a href="https://github.com/w3tecch/express-typescript-boilerplate" rel="nofollow noreferrer">this</a> boilerplate for my api. It uses express and typeorm with typescript.</p>
  <p>When I want want to delete a question, it works fine, but the response is a <code>404 not found</code>.</p>
  <p>Here is my <code>Question.ts</code> class:</p>
  <pre class="lang-js prettyprint-override"><code>@Entity()
  export class Question extends BaseEntity {
  
      @PrimaryColumn('uuid')
      public id: string;
  
      @IsNotEmpty()
      @Column()
      public title: string;
  
      @IsNotEmpty()
      @Column({
          length: 2000,
      })
      public description: string;
  
      @IsNotEmpty()
      @Column()
      public answered: boolean;
  
      @ManyToOne(type =&gt; User, user =&gt; user.questions, { onDelete: 'SET NULL', onUpdate: 'CASCADE' })
      public user: User;
  
      @IsNotEmpty()
      @ManyToMany(type =&gt; Tag)
      @JoinTable()
      public tags: Tag[];
  
      @OneToMany(type =&gt; Answer, answer =&gt; answer.question)
      public answers: Answer[];
  
      @OneToMany(type =&gt; Comment, comment =&gt; comment.question)
      public comments: Comment[];
  }
  </code></pre>
  <p>Here is my request in the controller:</p>
  <pre class="lang-js prettyprint-override"><code>@Delete('/:id')
  public delete(@Param('id') id: string): Promise&lt;void&gt; {
      return this.questionService.delete(id);
  }
  </code></pre>
  <p>Here is my method in the service:</p>
  <pre class="lang-js prettyprint-override"><code>public async delete(id: string): Promise&lt;void&gt; {
      this.log.info('Delete questions: ', id);
      try {
          await Question.delete(id);
      } catch (error) {
          this.log.error('Could not delete question: ', id, ' Message: ', error);
      }
  }
  </code></pre>
  <p>In the console I get the following error:
  <a href="https://i.stack.imgur.com/yhLgb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yhLgb.png" alt="console error" /></a></p>
  <p>When I get all the questions after the delete, the question isn't there anymore, so the question has been succesfully deleted. Why am I getting a 404 although my delete works?</p>
  <h2>Update</h2>
  <p>On Request of aRvi, here is the full file of the controller:</p>
  <pre class="lang-js prettyprint-override"><code>import { Request } from 'express';
  import {
      Body, Delete, Get, JsonController, OnUndefined, Param, Post, Put, QueryParam, Req
  } from 'routing-controllers';
  import { ResponseSchema } from 'routing-controllers-openapi';
  
  import { QuestionNotFoundError } from '../errors/QuestionNotFoundError';
  import { Answer, Comment, PagedResult, Question, Tag, User } from '../models/Models';
  import { QuestionService } from '../services/Services';
  import { CreateQuestionBody } from './Bodies/CreateQuestionBody';
  import { PutQuestionBody } from './Bodies/PutQuestionBody';
  import { QuestionResponse } from './responses/Responses';
  
  @JsonController('/questions')
  export class QuestionController {
      constructor(
          private questionService: QuestionService
      ) { }
  
      @Get()
      // tslint:disable-next-line:max-line-length
      public async find(@Req() req: Request, @QueryParam('skip') skip: number, @QueryParam('take') take: number, @QueryParam('orderBy') orderBy: string, @QueryParam('where') where: string): Promise&lt;PagedResult&lt;Question&gt;&gt; {
          const questions = await this.questionService.find();
  
          return new PagedResult&lt;Question&gt;().Create(req, questions, skip, take, orderBy, where);
      }
  
      @Get('/:id')
      @ResponseSchema(QuestionResponse)
      @OnUndefined(QuestionNotFoundError)
      public findOne(@Param('id') id: string): Promise&lt;Question | undefined&gt; {
          return this.questionService.findOne(id);
      }
  
      @Get('/:id/answers')
      @OnUndefined(QuestionNotFoundError)
      // tslint:disable-next-line:max-line-length
      public async findAnswers(@Req() req: Request, @Param('id') id: string, @QueryParam('skip') skip: number, @QueryParam('take') take: number, @QueryParam('orderBy') orderBy: string, @QueryParam('where') where: string): Promise&lt;PagedResult&lt;Answer&gt; | undefined&gt; {
          const answers = await this.questionService.findAnswers(id);
  
          return new PagedResult&lt;Answer&gt;().Create(req, answers, skip, take, orderBy, where);
      }
  
      @Get('/:id/comments')
      @OnUndefined(QuestionNotFoundError)
      // tslint:disable-next-line:max-line-length
      public async findComments(@Req() req: Request, @Param('id') id: string, @QueryParam('skip') skip: number, @QueryParam('take') take: number, @QueryParam('orderBy') orderBy: string, @QueryParam('where') where: string): Promise&lt;PagedResult&lt;Comment&gt; | undefined&gt; {
          const comments = await this.questionService.findComments(id);
  
          return new PagedResult&lt;Comment&gt;().Create(req, comments, skip, take, orderBy, where);
      }
  
      @Get('/:id/tags')
      @OnUndefined(QuestionNotFoundError)
      // tslint:disable-next-line:max-line-length
      public async findTags(@Req() req: Request, @Param('id') id: string, @QueryParam('skip') skip: number, @QueryParam('take') take: number, @QueryParam('orderBy') orderBy: string, @QueryParam('where') where: string): Promise&lt;PagedResult&lt;Tag&gt; | undefined&gt; {
          const tags = await this.questionService.findTags(id);
  
          return new PagedResult&lt;Tag&gt;().Create(req, tags, skip, take, orderBy, where);
      }
  
      @Post()
      @ResponseSchema(QuestionResponse)
      public async create(@Body() body: CreateQuestionBody): Promise&lt;Question | undefined&gt; {
          const question = new Question();
          question.title = body.title;
          question.description = body.description;
          question.tags = body.tags;
          // TODO: change to current user
          const users = await User.find();
          const user = users[0];
          question.user = user;
          return this.questionService.create(question);
      }
  
      @Put()
      @ResponseSchema(QuestionResponse)
      public updateMerge(@Body() body: PutQuestionBody): Promise&lt;Question | undefined&gt; {
          return this.questionService.updateMerge(body);
      }
  
      @Post('/:id')
      @ResponseSchema(QuestionResponse)
      public updateOne(@Param('id') id: string, @Body() body: CreateQuestionBody): Promise&lt;Question | undefined&gt; {
          const question = new Question();
          question.title = body.title;
          question.description = body.description;
          question.tags = body.tags;
  
          return this.questionService.updateFull(id, question);
      }
  
      @Delete('/:id')
      public delete(@Param('id') id: string): Promise&lt;void&gt; {
          return this.questionService.delete(id);
      }
  }
  
  </code></pre>