There are a set of custom exception classes are used in the ZohoSharp library. The WebApiClientException class serves as a base class for the more detailed exception classes. It primarily defines a WebSafe property – this indicates whether, in spite of the exception, the Zoho database state may have been modified. For instance, if an exception occurs during the processing of POST results, the Zoho API has already been affected and this property should return false. Typically, however, this will return true, indicating that the Zoho database state should not have been altered.
The following types of exception classes are defined:
ApiExceptionErrorCode and ErrorMessage properties are included that contain the error code and the error message provided by the Zoho API.DeserializationExceptionModelExceptionResponseExceptionSerializationExceptionValidationExceptionModelInstance property should be populated with a reference to the model object failing validation. It also adds a ValidationResults dictionary that represent the reason(s) for validation failure - the key is the property name and the value is a list of validation reasons. Finally, it adds a ValidationMessage property which is a formatted string representation of the ValidationResults dictionary, providing all of the reasons for validation failure.© 2022 Jeff Williamson. All rights reserved. Privacy Policy | Terms of Service