Added web server errors and middleware