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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.