web: First steps towards better error handling