XML-RPC errors are contained in > faults < that have a value (faultCode) encoded as an integer and a message (faultString). The Gandi XML-RPC interface error codes are normalized. The format of Gandi errors is hierarchical and built upon the scheme:
| qualification (one digit) | object (three digits) | cause (two digits) |
|---|
The qualification, encoded on one digit, helps distinguishing between an input error and something that went wrong on the server side. There are two qualifications:
The object, encoded on three digits, depends on the qualification. For a Server qualification it may be Network, Database, System etc. For a Data qualification it is related to the objects passed as arguments, for instance a Phone Number.
The cause, encoded on two digits, depends on the object. For a Database object it may be a failed query and for a Phone Number it may be a Syntax Error.
Causes:
Causes:
The message associated to an error code is formatted as follow: <span class="format|ServerError: plain text description of the problem</span>
| faultCode | faultString |
|---|---|
| 110020 | ServerError: database query failed |
| 110040 | ServerError: database could not find object |
| 150000 | ServerError: internal error (error has been logged and will be reported |
In this qualification, all the objects share the same causes.
Checks on data are done sequentially. Depending on the type, not all checks apply. However, a data validation cycle is the following: first the type is checked, then the syntax and the value, then the existence of the object, then the privileges and, finally, the state.
The message associated to an error code is a plain text representations of the problem. It is formated as follow: DataError: plain text description of the problem [element: value]
Element is the name of the faulty parameter with its value appended after a colon and a space.
| faultCode | faultString |
|---|---|
| 500130 | DataError: invalid value for password [password: 123456] |
| 510210 | DataError: invalid type for operation id [opid: test] |
| 510050 | DataError: not enough privileges to access domain [domain: gandi.net] |
Aucune question sur cette page et ses sous-pages.
Flux RSS des questions correspondant à ce filtre (Aide)Dernière modification: le 03/03/2008 à 15:40 par Nicolas L. (Gandi)