Error Handling

The RPM Web Services API provides an error handling mechanism that allows client applications to recover from abnormal behavior. In the case that an RPM API call fails, it will either throw an exception of type RPMException or will embed a list of RPMExceptions in a Result, a SingleResult, or an ArrayResult object.. The RPMException carries the RPMObject ID (if the object has already been created), an RPM error code, an error, a severity level, an error message text, and the class name that is concerned. Refer to Chapter 6 for more details on these objects.

For the maximum length validation of strings, the validation is done in UTF-8 format. In UTF-8, ASCII characters are represented as one character while extended characters are represented with 2 to 4 characters each.