mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-24 10:12:19 -05:00
2ac91f50c8
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2 4b5297f7-1745-476d-ba37-a9c6900126ab
348 lines
9.5 KiB
XML
348 lines
9.5 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
<!DOCTYPE jep SYSTEM '../jep.dtd' [
|
|
<!ENTITY % ents SYSTEM '../jep.ent'>
|
|
%ents;
|
|
]>
|
|
<?xml-stylesheet type='text/xsl' href='../jep.xsl'?>
|
|
<jep>
|
|
<header>
|
|
<title>Error Condition Mappings</title>
|
|
<abstract>A mapping to enable legacy entities to correctly handle errors from XMPP-aware entities.</abstract>
|
|
&LEGALNOTICE;
|
|
<number>0086</number>
|
|
<status>Active</status>
|
|
<type>Informational</type>
|
|
<jig>Standards JIG</jig>
|
|
<dependencies>
|
|
<spec>XMPP Core</spec>
|
|
</dependencies>
|
|
<supersedes/>
|
|
<supersededby/>
|
|
<shortname>N/A</shortname>
|
|
<author>
|
|
<firstname>Robert</firstname>
|
|
<surname>Norris</surname>
|
|
<email>rob@cataclysm.cx</email>
|
|
<jid>rob@cataclysm.cx</jid>
|
|
</author>
|
|
&stpeter;
|
|
<revision>
|
|
<version>1.0</version>
|
|
<date>2004-02-17</date>
|
|
<initials>psa</initials>
|
|
<remark>Per a vote of the Jabber Council, advanced status to Active.</remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.7</version>
|
|
<date>2003-11-26</date>
|
|
<initials>psa</initials>
|
|
<remark>Added <not-authorized/> condition.</remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.6</version>
|
|
<date>2003-11-25</date>
|
|
<initials>psa</initials>
|
|
<remark>Corrected 'type' of <not-acceptable/> error from "cancel" to "modify".</remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.5</version>
|
|
<date>2003-11-17</date>
|
|
<initials>psa</initials>
|
|
<remark>Fixed a syntax error.</remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.4</version>
|
|
<date>2003-10-30</date>
|
|
<initials>psa</initials>
|
|
<remark>Added <gone/> XMPP condition.</remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.3</version>
|
|
<date>2003-09-25</date>
|
|
<initials>psa</initials>
|
|
<remark>Further updated to track XMPP WG output; fixed several errors.</remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.2</version>
|
|
<date>2003-08-13</date>
|
|
<initials>psa</initials>
|
|
<remark>Updated to track XMPP WG output.</remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.1</version>
|
|
<date>2003-05-21</date>
|
|
<initials>rn</initials>
|
|
<remark>Initial release.</remark>
|
|
</revision>
|
|
</header>
|
|
<section1 topic='Introduction'>
|
|
<p>&xmppcore; documents formats and semantics for stanza error responses. The XML of these errors is different from that of errors that have been traditionally used on the Jabber network.</p>
|
|
<p>Until such time that all entities support these new XMPP-style errors, there is a need for entities to issue errors that are understandable by both legacy and XMPP-compliant entities. This document outlines an appropriate mapping to allow this to occur.</p>
|
|
<p>This document can also be used by implementers of legacy protocols to determine which XMPP-style error should be used when only a legacy error code is documented.</p>
|
|
</section1>
|
|
<section1 topic='Supporting Legacy Entities'>
|
|
<p>XMPP-compliant entities can issue errors to legacy clients and servers by adding a "code" attribute to the <error/> element it sends.</p>
|
|
<example caption='A simple error response'><![CDATA[
|
|
<message
|
|
to='juliet@capulet.com/balcony'
|
|
from='romeo@montague.net/garden'
|
|
type='chat'>
|
|
<body>Wherefore art thou, Romeo?</body>
|
|
<error code='404' type='cancel'>
|
|
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
|
</error>
|
|
</message>
|
|
]]></example>
|
|
|
|
<p>Legacy entities receiving this error will use the "404" to determine what happened, while XMPP-compliant entities will use the error type and the child element that specifies the condition.</p>
|
|
|
|
<p>XMPP-compliant entities should add the following error codes to errors if they want them to be understood by legacy entities:</p>
|
|
|
|
<table caption='Error codes to add to XMPP-style errors'>
|
|
<tr>
|
|
<th>XMPP error condition</th>
|
|
<th>XMPP error type</th>
|
|
<th>Legacy error code</th>
|
|
</tr>
|
|
<tr>
|
|
<td><bad-request/></td>
|
|
<td>modify</td>
|
|
<td>400</td>
|
|
</tr>
|
|
<tr>
|
|
<td><conflict/></td>
|
|
<td>cancel</td>
|
|
<td>409</td>
|
|
</tr>
|
|
<tr>
|
|
<td><feature-not-implemented/></td>
|
|
<td>cancel</td>
|
|
<td>501</td>
|
|
</tr>
|
|
<tr>
|
|
<td><forbidden/></td>
|
|
<td>auth</td>
|
|
<td>403</td>
|
|
</tr>
|
|
<tr>
|
|
<td><gone/></td>
|
|
<td>modify</td>
|
|
<td>302 (permanent)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><internal-server-error/></td>
|
|
<td>wait</td>
|
|
<td>500</td>
|
|
</tr>
|
|
<tr>
|
|
<td><item-not-found/></td>
|
|
<td>cancel</td>
|
|
<td>404</td>
|
|
</tr>
|
|
<tr>
|
|
<td><jid-malformed/></td>
|
|
<td>modify</td>
|
|
<td>400</td>
|
|
</tr>
|
|
<tr>
|
|
<td><not-acceptable/></td>
|
|
<td>modify</td>
|
|
<td>406</td>
|
|
</tr>
|
|
<tr>
|
|
<td><not-allowed/></td>
|
|
<td>cancel</td>
|
|
<td>405</td>
|
|
</tr>
|
|
<tr>
|
|
<td><not-authorized/></td>
|
|
<td>auth</td>
|
|
<td>401</td>
|
|
</tr>
|
|
<tr>
|
|
<td><payment-required/></td>
|
|
<td>auth</td>
|
|
<td>402</td>
|
|
</tr>
|
|
<tr>
|
|
<td><recipient-unavailable/></td>
|
|
<td>wait</td>
|
|
<td>404</td>
|
|
</tr>
|
|
<tr>
|
|
<td><redirect/></td>
|
|
<td>modify</td>
|
|
<td>302 (temporary)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><registration-required/></td>
|
|
<td>auth</td>
|
|
<td>407</td>
|
|
</tr>
|
|
<tr>
|
|
<td><remote-server-not-found/></td>
|
|
<td>cancel</td>
|
|
<td>404</td>
|
|
</tr>
|
|
<tr>
|
|
<td><remote-server-timeout/></td>
|
|
<td>wait</td>
|
|
<td>504</td>
|
|
</tr>
|
|
<tr>
|
|
<td><resource-constraint/></td>
|
|
<td>wait</td>
|
|
<td>500</td>
|
|
</tr>
|
|
<tr>
|
|
<td><service-unavailable/></td>
|
|
<td>cancel</td>
|
|
<td>503</td>
|
|
</tr>
|
|
<tr>
|
|
<td><subscription-required/></td>
|
|
<td>auth</td>
|
|
<td>407</td>
|
|
</tr>
|
|
<tr>
|
|
<td><undefined-condition/></td>
|
|
<td>[any]</td>
|
|
<td>500</td>
|
|
</tr>
|
|
<tr>
|
|
<td><unexpected-request/></td>
|
|
<td>wait</td>
|
|
<td>400</td>
|
|
</tr>
|
|
</table>
|
|
</section1>
|
|
|
|
<section1 topic='Implementing Legacy Protocols'>
|
|
<p>Implementors of legacy protocols should use the appropriate XMPP-style error alongside a legacy error code as specified in the following table:</p>
|
|
|
|
<table caption='Mapping of legacy error codes to XMPP-style errors'>
|
|
<tr>
|
|
<th>Legacy error code</th>
|
|
<th>Meaning</th>
|
|
<th>XMPP error condition</th>
|
|
<th>XMPP error type</th>
|
|
</tr>
|
|
<tr>
|
|
<td>302</td>
|
|
<td>Redirect</td>
|
|
<td><redirect/> (temporary) or <gone/> (permanent)</td>
|
|
<td>modify</td>
|
|
</tr>
|
|
<tr>
|
|
<td>400</td>
|
|
<td>Bad Request</td>
|
|
<td><bad-request/>
|
|
<note>See also the <jid-malformed/> and <unexpected-request/> stanza errors.</note>
|
|
</td>
|
|
<td>modify</td>
|
|
</tr>
|
|
<tr>
|
|
<td>401</td>
|
|
<td>Not Authorized</td>
|
|
<td><not-authorized/>
|
|
<note>See also the <not-authorized/> stream error.</note>
|
|
</td>
|
|
<td>auth</td>
|
|
</tr>
|
|
<tr>
|
|
<td>402</td>
|
|
<td>Payment Required</td>
|
|
<td><payment-required/></td>
|
|
<td>auth</td>
|
|
</tr>
|
|
<tr>
|
|
<td>403</td>
|
|
<td>Forbidden</td>
|
|
<td><forbidden/></td>
|
|
<td>auth</td>
|
|
</tr>
|
|
<tr>
|
|
<td>404</td>
|
|
<td>Not Found</td>
|
|
<td><item-not-found/>
|
|
<note>See also the <remote-server-not-found/> stanza error.</note>
|
|
</td>
|
|
<td>cancel</td>
|
|
</tr>
|
|
<tr>
|
|
<td>405</td>
|
|
<td>Not Allowed</td>
|
|
<td><not-allowed/></td>
|
|
<td>cancel</td>
|
|
</tr>
|
|
<tr>
|
|
<td>406</td>
|
|
<td>Not Acceptable</td>
|
|
<td><not-acceptable/>
|
|
<note>See also the <unexpected-request/> stanza error.</note>
|
|
</td>
|
|
<td>modify</td>
|
|
</tr>
|
|
<tr>
|
|
<td>407</td>
|
|
<td>Registration Required</td>
|
|
<td><registration-required/></td>
|
|
<td>auth</td>
|
|
</tr>
|
|
<tr>
|
|
<td>408</td>
|
|
<td>Request Timeout</td>
|
|
<td><remote-server-timeout/></td>
|
|
<td>wait</td>
|
|
</tr>
|
|
<tr>
|
|
<td>409</td>
|
|
<td>Conflict</td>
|
|
<td><conflict/></td>
|
|
<td>cancel</td>
|
|
</tr>
|
|
<tr>
|
|
<td>500</td>
|
|
<td>Internal Server Error</td>
|
|
<td><internal-server-error/>
|
|
<note>See also the <undefined-condition/> stanza error.</note>
|
|
</td>
|
|
<td>wait</td>
|
|
</tr>
|
|
<tr>
|
|
<td>501</td>
|
|
<td>Not Implemented</td>
|
|
<td><feature-not-implemented/></td>
|
|
<td>cancel</td>
|
|
</tr>
|
|
<tr>
|
|
<td>502</td>
|
|
<td>Remote Server Error</td>
|
|
<td><service-unavailable/></td>
|
|
<td>wait</td>
|
|
</tr>
|
|
<tr>
|
|
<td>503</td>
|
|
<td>Service Unavailable</td>
|
|
<td><service-unavailable/></td>
|
|
<td>cancel</td>
|
|
</tr>
|
|
<tr>
|
|
<td>504</td>
|
|
<td>Remote Server Timeout</td>
|
|
<td><remote-server-timeout/></td>
|
|
<td>wait</td>
|
|
</tr>
|
|
<tr>
|
|
<td>510</td>
|
|
<td>Disconnected</td>
|
|
<td><service-unavailable/></td>
|
|
<td>cancel</td>
|
|
</tr>
|
|
</table>
|
|
</section1>
|
|
<section1 topic='Conclusion'>
|
|
<p>Mapping legacy error codes to XMPP-style errors is an inexact science, and there are likely to be inconsistencies in some places. However, it is the authors' belief that the mapping presented in this document will be adequate for the majority of cases, and will help smooth the migration to XMPP-compliant implementations.</p>
|
|
</section1>
|
|
</jep>
|