title: How to handle Sequelize validation errors with proper way?
body: <p>I'm building simple REST API with Typescript, Koa and Sequelize.</p>
  
  <p>If the client performs an invalid PUT request with empty field "title" or "author" it returns a 500 error. I would rather not report an error like that but like to return a '400 Bad Request' instead.
  What is the proper way to do that?</p>
  
  <p>Here is part of the controller:</p>
  
  <pre class="lang-js prettyprint-override"><code>import {JsonController, Get, Post, Put, Body, Param} from "routing-controllers";
  import {Book} from "../models/Book";
  
  @JsonController("/api")
  export class BookController {
      @Put("/books/:id")
      async update(@Param("id") id: number, @Body() book: Book) {
          return await Book.update(book, {where: {id: id}});
      }
  }
  </code></pre>
  
  
  
  <p>And this is the model where I use Sequelize validators as decorators:</p>
  
  <pre class="lang-js prettyprint-override"><code>import {Table, Column, NotEmpty, Equals, Model, HasMany} from 'sequelize-typescript';
  
  @Table({tableName: 'Books'})
  export class Book extends Model&lt;Book&gt; {
  
      @NotEmpty
      @Column
      title: string;
  
      @NotEmpty
      @Column
      author: string;
  }
  </code></pre>
  
  
  
  <p>Error message:</p>
  
  <pre><code>"message": "Validation error: Validation notEmpty on title failed,\nValidation error: Validation notEmpty on author failed"
  </code></pre>