Middleware

Create and register custom middleware to the request handling pipeline, analogous to ASP.NET Core. Note that the middlewares will execute by registration order.

In this section let’s create a basic global error handling middleware.