Improved error messages at two points in the broker