Enhance error messages for errors inside the static argument.