Instead of setting the error properties manually. Look for error-conditions and error-message.
error-conditions
error-message