Added 404 error when a user or environment doesnt exist