Added 404 error handling and fixed HTTPBroker error handling