Happy Business Starts Here

Raise meaningful error messages instead of NullPointerException when required fields are mi

Related to this community message here 



I've experienced similiar error messages from within Zuora's package while trying to programmatically build quotes. In the example above, Zuora's code did not properly handle a scenario when the Address1 field was missing from a Contact so it threw a NullPointerException.  I've received this same error message when the Initial Term wasn't populated on a Quote.


Zuora's code should never throw NullPointerExceptions. Instead it should throw meaningful exceptions such as 


throw new ZuoraRequiredFieldException("Address1 on BillToContact is null");


Don't leave us guessing as to which field on potentially several different objects hasn't met some criteria required by Zuora.

Valued Scholar

I totally agree, there are many error messages that are hard coded in CPQ that the SF admin cannot update to be meaningful.  Provide more context within the message or allow the SF amin the ability to customize the error message, like the rules engine.

Zuora Alumni

Hi @Jamie @billdavis 

absolutely agree and understand your point.

For this specific error condition, we have an internal Jira (for your reference: COM-12999)  to track this request to throw application level error message.

Sorry for the inconevenience at hand.