RPC Fault Codes

decoding faults

In XML-RPC errors are called faults. A fault is a struct with two members: the faultCode and the faultString.

In the Gandi API, a faultCode is made of 3 parameters describing the error: qualif, object and cause.

qualif can be either data if the error is due to faulty user input or server if it is caused by a server-side internal error.

object represents the parameter triggering the error.

cause is why the error was raised.

Note

Those codes don’t change on API update. Should a change occur the release would be flagged as API BREAK like it would if method signatures changed.

The faultCode being a numeric representation of an error, it has to be processed in order to extract all the meaningfull data it contains. To parse the faultCode you have to apply arithmetic operations such as divisions and modulos as described in the following section:

>>> api.domain.info(key, 1)
Fault: <Fault 505237: 'Error on object : OBJECT_FQDN (CAUSE_BADPARAMETER)...
# In that case the faultcode is 505237
# Let's decompose the error qualification
>>> faultCode = 505237
>>> qualif = faultCode / 100000
>>> object = faultCode % 100000 / 100
>>> cause = faultCode % 100
>>> print(qualif, object, cause)
5 52 37
# 5 is the ``data`` qualif
# 52 is the ``OBJECT_FQDN``
# 37 is the ``CAUSE_BADPARAMETER``

The following tables list every error code that can be raised by the Gandi API.

data

qualif: 5

object

id object
0 OBJECT_UNKNOWN
1 OBJECT_PASSWORD
2 OBJECT_SESSION
3 OBJECT_LOGIN
10 OBJECT_INTEGER
11 OBJECT_BOOLEAN
12 OBJECT_STRING
13 OBJECT_DATE
14 OBJECT_LIST
15 OBJECT_STRUCT
16 OBJECT_METHOD
17 OBJECT_KEY
18 OBJECT_FLOAT
19 OBJECT_DURATION
50 OBJECT_EMAIL
51 OBJECT_URL
52 OBJECT_FQDN
53 OBJECT_IPV4
54 OBJECT_WEB_REDIRECTION
55 OBJECT_TRANSFER
56 OBJECT_TRANSFEROUT
57 OBJECT_IPV6
58 OBJECT_CIDR
100 OBJECT_DOMAIN
101 OBJECT_ACCOUNT
102 OBJECT_OPERATION
103 OBJECT_MAILBOX
104 OBJECT_FORWARD
105 OBJECT_MAILZONE
106 OBJECT_HOST
107 OBJECT_STATUS
108 OBJECT_DNSSEC_KEY
109 OBJECT_MAIL
110 OBJECT_REACHABILITY
111 OBJECT_CLAIMS
112 OBJECT_CONTACT_REGISTRY
113 OBJECT_DNSSEC_ALGO
114 OBJECT_DNSSEC_FLAGS
115 OBJECT_ALIAS
140 OBJECT_COMPANY_NAME
141 OBJECT_BODY_NAME
142 OBJECT_ASSOCIATION_NAME
150 OBJECT_PHONE
151 OBJECT_FRENCH_DEPARTMENT
152 OBJECT_COUNTRY_CODE
153 OBJECT_CONTACT_TYPE
154 OBJECT_CONTACT_CLASS
155 OBJECT_ISO_LANGUAGE
156 OBJECT_CONTACT_LANG
157 OBJECT_STATE_CODE
160 OBJECT_AUTH_CODE
161 OBJECT_CONTACT
162 OBJECT_CORPO
163 OBJECT_LANG
164 OBJECT_REGISTRY
165 OBJECT_EOI
166 OBJECT_TLD
167 OBJECT_PHASE
168 OBJECT_CHANGEOWNER
169 OBJECT_RESELLER
170 OBJECT_SUDO
200 OBJECT_REDIRECTION_TYPE
201 OBJECT_BUYRENEW_PERIOD
210 OBJECT_AUTORENEW
211 OBJECT_PREPAID
212 OBJECT_TRANSACTION
220 OBJECT_PACKMAIL
230 OBJECT_DOCUMENT
231 OBJECT_DOCUMENTREQUEST
232 OBJECT_SSL
233 OBJECT_COUNTRY
234 OBJECT_AUTO_CREDIT
235 OBJECT_SMD
236 OBJECT_ZIP
237 OBJECT_GOODIE
238 OBJECT_AUTOFOA
239 OBJECT_DELETE
240 OBJECT_FOA
241 OBJECT_MAILBOXOPTION
250 OBJECT_OPERATION_STATE
251 OBJECT_OPERATION_TYPE
252 OBJECT_OPERATION_EVENT
300 OBJECT_HOSTING_ACCOUNT
302 OBJECT_VM
303 OBJECT_META
304 OBJECT_DISK
305 OBJECT_OS
306 OBJECT_META_CONF
307 OBJECT_VM_CONF
308 OBJECT_VM_IP
309 OBJECT_VM_SHARES
310 OBJECT_FLEX
311 OBJECT_FLEX_SHARES
312 OBJECT_FLEX_DATE_START
313 OBJECT_FLEX_DATE_END
314 OBJECT_FLEX_OP
315 OBJECT_FLEX_ACTION
316 OBJECT_VM_TRIGGER
317 OBJECT_IFACE
318 OBJECT_IP
319 OBJECT_BANDWIDTH
320 OBJECT_LB
321 OBJECT_LBSERVER
322 OBJECT_LBFARM
323 OBJECT_LBLISTENER
324 OBJECT_SNAPSHOT
325 OBJECT_IMAGE
326 OBJECT_LBCONFIGLISTENER
327 OBJECT_DATACENTER
350 OBJECT_HOSTING_ACCOUNT_STATUS
351 OBJECT_HOSTING_PRODUCT
375 OBJECT_PAAS
376 OBJECT_VIRTUALHOST
377 OBJECT_VLAN
378 OBJECT_SNAPSHOT_PROFILE
379 OBJECT_RPROXY
401 OBJECT_CERTIFICATE
402 OBJECT_CSR
403 OBJECT_PACKAGE
404 OBJECT_CN
405 OBJECT_WILDCARD
406 OBJECT_ALTNAME
407 OBJECT_JOI
408 OBJECT_CERT_IDA
409 OBJECT_DCV
600 OBJECT_SITE
601 OBJECT_SITE_HOST
602 OBJECT_GANDI_SITE_HOST
603 OBJECT_USER
604 OBJECT_SITEMAKER_ERROR
605 OBJECT_SITE_HOST_IP
606 OBJECT_SITE_OFFER
607 OBJECT_SITE_NAME
608 OBJECT_SITE_COUNT
609 OBJECT_SITEMAKER_CONNECTION
609 OBJECT_SITE_KEY
700 OBJECT_TVA
701 OBJECT_CURRENCY
702 OBJECT_CATALOG_ENTRY
703 OBJECT_PROMO_CODE
704 OBJECT_COUPON_CODE
705 OBJECT_PRICER_DURATION
706 OBJECT_PRICER_QUANTITY
707 OBJECT_REFUND
708 OBJECT_FEE
709 OBJECT_BILL_ITEM
710 OBJECT_PRODUCT
711 OBJECT_BILL
712 OBJECT_PAYMENT
713 OBJECT_ACTION_TYPE
714 OBJECT_DESCRIPTION
715 OBJECT_QUANTITY
716 OBJECT_CONTACT_PREF
717 OBJECT_DOMAIN_PREF
718 OBJECT_CONTRACT
719 OBJECT_TOTP
720 OBJECT_POSTIT
721 OBJECT_POSTIT_OBJECT_TYPE
722 OBJECT_BUSINESS_UNIT
723 OBJECT_GRID
724 OBJECT_PAYMENTTYPE
800 OBJECT_DNS_CNAME
801 OBJECT_DNS_TXT
802 OBJECT_DNS_ADDRESS
803 OBJECT_DNS_A
804 OBJECT_DNS_AAAA
805 OBJECT_DNS_MX
806 OBJECT_DNS_SPF
810 OBJECT_ZONE
811 OBJECT_DNS_RECORD

cause

id cause
0 CAUSE_UNKNOWN
1 CAUSE_NO_KERNEL
2 CAUSE_CMDLINE_OPT
3 CAUSE_HUMANREGISTRY
4 CAUSE_LOCK
5 CAUSE_TIMEOUT
10 CAUSE_TYPE
20 CAUSE_SYNTAX
23 CAUSE_CORPORATE
30 CAUSE_VALUE
31 CAUSE_SIZE
32 CAUSE_EXPECTED
33 CAUSE_UNEXPECTED
34 CAUSE_IDENTICAL
35 CAUSE_QUOTA_REACHED
36 CAUSE_NAME
37 CAUSE_BADPARAMETER
38 CAUSE_HOSTNAME
39 CAUSE_ATTACHED
40 CAUSE_DONTEXIST
41 CAUSE_EXIST
42 CAUSE_NOTFOUND
43 CAUSE_NO_RESULT
44 CAUSE_NOTHING_TO_UPDATE
45 CAUSE_POSITION
46 CAUSE_NO_DISK
47 CAUSE_INVALID_PHASE
48 CAUSE_CONF
49 CAUSE_EXPIRED
50 CAUSE_NORIGHT
51 CAUSE_DATACENTER
52 CAUSE_MULTIPLE_RESULTS
53 CAUSE_QUERY
54 CAUSE_DISABLED
55 CAUSE_PRICE
56 CAUSE_AUTHINFO
57 CAUSE_MAX_VALUE
60 CAUSE_STATE
61 CAUSE_ORDER_NOT_DONE
62 CAUSE_BILLED
63 CAUSE_NOT_ENOUGH_MONEY
64 CAUSE_CURRENCY_MISMATCH
65 CAUSE_QUANTITY_OR_PERIOD_NULL
66 CAUSE_FAILURE
67 CAUSE_PENDING
68 CAUSE_RUNNING
69 CAUSE_ATTACHED_RUNNING
70 CAUSE_INCOMPATIBILITY
71 CAUSE_VM_META_INCOMPATIBILITY
72 CAUSE_OS_META_INCOMPATIBILITY
73 CAUSE_METAS_INCOMPATIBILITY
74 CAUSE_VMSHARES_META_INCOMPATIBILITY
75 CAUSE_META_DEPENDENCIES
81 CAUSE_NOT_CONFIGURED
82 CAUSE_PREMIUM
83 CAUSE_NOT_SLOT
84 CAUSE_ALREADY_STANDARD
85 CAUSE_ALREADY_PREMIUM
90 CAUSE_INVALID_STEP
91 CAUSE_INVALID
92 CAUSE_INVALID_RESOURCE
93 CAUSE_CURRENCY
94 CAUSE_EPPERROR
95 CAUSE_CANNOT_SHRINK
96 CAUSE_IP_VERSION_MISMATCH
97 CAUSE_VERSION
98 CAUSE_NOT_ATTACHED
99 CAUSE_TOOMANY
100 CAUSE_CERT_PRESIGN

server

qualif: 1

object

id object
0 OBJECT_UNKNOWN
100 OBJECT_DATABASE
200 OBJECT_REGISTRIES
300 OBJECT_NETWORK
400 OBJECT_SYSTEM
500 OBJECT_APPLICATION
600 OBJECT_SERVICE
601 OBJECT_COMODO_API

cause

id cause
0 CAUSE_UNKNOWN
4 CAUSE_TOOMANY
5 CAUSE_UNAVAILABLE
10 CAUSE_CONNECTION
20 CAUSE_QUERY
30 CAUSE_CONF