Error responses contain an error code within a
cause element, and one or more descriptive
messages describing the reason for the failure.
For example:
<response>
<failure>
<cause>VALIDATION</cause>
<messages>
<message>key is required</message>
<message>ns is required</message>
</messages>
</failure>
</response>
The following are some failure causes that may be encountered from a variety of service calls:
- VALIDATION. Required request parameters have not been provided.
- INVALID_NAMESPACE. The namespace provided could not be found or could not be used with the web service called.
- INVALID_DEVELOPER_KEY. The developer key supplied was not valid or could not be used with the web service called.
- EXPIRED_TICKET. The user ticket supplied has expired. Tickets are valid for 10 hours.
- INVALID_TICKET. The user ticket supplied is not valid.
- UNAUTHORIZED. The service could not be called on behalf of the user corresponding to the supplied ticket, or for an anonymous user.
- LOGIN_REQUIRED. The service could not be called for an anonymous user.
- READ_ONLY_MODE. The Wetpaint system is currently in a read-only maintenance mode. Content is available for viewing, but not modification.
Additional failure causes are trigged by specific service calls. These are noted with the documentation for those calls.
The following schema describes this response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="failure" type="failure"/>
<xs:element name="response" type="response"/>
<xs:complexType name="response">
<xs:sequence>
<xs:any processContents="lax" namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="version" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="failure">
<xs:sequence>
<xs:element name="cause" type="failureCause" minOccurs="0"/>
<xs:element name="messages" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="message" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="failureCause">
<xs:restriction base="xs:string">
<xs:enumeration value="ERROR"/>
<xs:enumeration value="EXPIRED_TICKET"/>
<xs:enumeration value="INVALID_DEVELOPER_KEY"/>
<xs:enumeration value="INVALID_NAMESPACE"/>
<xs:enumeration value="INVALID_TICKET"/>
<xs:enumeration value="LOGIN_REQUIRED"/>
<xs:enumeration value="READ_ONLY_MODE"/>
<xs:enumeration value="UNAUTHORIZED"/>
<xs:enumeration value="VALIDATION"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>