anchor.diff:  .Kotlin
   [source, kotlin, role = "secondary"]
   ----
  -import io.jooby.Medio.json
  -import io.jooby.Medio.html
  -
  -{
  -  install(MyTemplateEngineModule())       <1>
  +import io.jooby.MediaType.json
  +import io.jooby.MediaType.html
  +
  +{
  +  install(MyTemplateEngineModule())                           <1>
     
  -  install(MyJsonModule())                 <2>
  +  install(MyJsonModule())                                     <2>
   
     error {ctx, cause, statusCode ->
       val router = ctx.router
       router.log.error("found `{}` error", statusCode.value(), cause)
       
  -    val accept = ctx.accepts(json)        <3>
  -    if (json == accept) {                 <4>
  +    if (ctx.accept(json)) {                                   <3>
         val error = mapOf(...)
  -      ctx.render(error)
  +      ctx.render(error)                                       <4>
       } else {
  -      // fallback to html
  -      val error = mapOf(...)
  -      ctx.render(ModelAndView("error.template", error))
  +        // fallback to html
  +        val error = mapOf(...)
  +        ctx.render(ModelAndView("error.template", error))     <5>
       }
     }
   }
  
positive.code:   error((ctx, cause, statusCode) -> {                                      <1>
      Router router = ctx.getRouter();
      router.getLog().error("found `{}` error", statusCode.value(), cause);  <2>
      ctx.setResponseStatusCode(statusCode);
      ctx.send("found `" + statusCode.value() + "` error");                  <3>
    });
  }
  
negative.code: == Error Handler
  
  Jooby catches application exception using the javadoc:ErrorHandler[] class. The
  javadoc:ErrorHandler[DEFAULT] error handler produces simple HTML page or JSON based on the value
  of the `ACCEPT` header and log the exception.
  
  