code: func newHTTPHandler(f func(c context.Context) error) router.Handler {
  	return func(c *router.Context) {
  		c.Writer.Header().Set("Content-Type", "text/plain")
  
  		if err := f(c.Context); err != nil {
  			errors.Log(c.Context, err)
  			c.Writer.WriteHeader(http.StatusInternalServerError)
  			return
  		}
  
  		c.Writer.WriteHeader(http.StatusOK)
  	}
  }
docs: // newHTTPHandler returns a router.Handler which invokes the given function.