code: func renderErr(h func(*router.Context) error) router.Handler {
  	return func(ctx *router.Context) {
  		err := h(ctx)
  		if err == nil {
  			return
  		}
  
  		s, _ := status.FromError(err)
  		message := s.Message()
  		if message != "" {
  			// Convert the first rune to upper case.
  			r, n := utf8.DecodeRuneInString(message)
  			message = string(unicode.ToUpper(r)) + message[n:]
  		} else {
  			message = "Unspecified error" // this should not really happen
  		}
  
  		ctx.Writer.Header().Set("Content-Type", "text/html; charset=utf-8")
  		ctx.Writer.WriteHeader(grpcutil.CodeStatus(s.Code()))
  		templates.MustRender(ctx.Context, ctx.Writer, "pages/error.html", map[string]interface{}{
  			"Message": message,
  		})
  	}
  }
docs: // renderErr is a handler wrapper converts gRPC errors into HTML pages.