<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>Application-Specific Error Conditions</title>
  <abstract>This document defines a registry of application-specific error conditions.</abstract>
  
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
  <number>0182</number>
  <status>Active</status>
  <type>Procedural</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies>
    <spec>XMPP Core</spec>
  </dependencies>
  <supersedes/>
  <supersededby/>
  <shortname>errors</shortname>
  <registry/>
  
  <author>
    <firstname>Peter</firstname>
    <surname>Saint-Andre</surname>
    <email>stpeter@stpeter.im</email>
    <jid>stpeter@jabber.org</jid>
    <uri>https://stpeter.im/</uri>
  </author>

  <revision>
    <version>1.1</version>
    <date>2008-03-05</date>
    <initials>psa</initials>
    <remark><p>Changed namespace from http://jabber.org/protocol/errors to urn:xmpp:errors.</p></remark>
  </revision>
  <revision>
    <version>1.0</version>
    <date>2006-05-16</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the Jabber Council, advanced status to Active; also added example.</p></remark>
  </revision>
  <revision>
    <version>0.2</version>
    <date>2006-04-28</date>
    <initials>psa</initials>
    <remark><p>Added note about scope of registry.</p></remark>
  </revision>
  <revision>
    <version>0.1</version>
    <date>2006-03-23</date>
    <initials>psa</initials>
    <remark><p>Initial version.</p></remark>
  </revision>
  <revision>
    <version>0.0.1</version>
    <date>2006-03-21</date>
    <initials>psa</initials>
    <remark><p>First draft.</p></remark>
  </revision>
</header>
<section1 topic="Introduction" anchor="intro">
  <p><span class="ref"><link url="http://tools.ietf.org/html/rfc6120">XMPP Core</link></span> <note>RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core &lt;<link url="http://tools.ietf.org/html/rfc6120">http://tools.ietf.org/html/rfc6120</link>&gt;.</note> specifies that an XMPP error stanza may include a child element qualified by an XML namespace other than 'urn:ietf:params:xml:ns:xmpp-stanzas'. This enables any XMPP protocol extension to define its own application-specific error conditions, such as the following:</p>
  <example caption="An Application-Specific Error Condition (invalid-jid)"><![CDATA[
<iq type='error' from='pubsub.shakespeare.lit' to='francisco@denmark.lit/barracks' id='sub1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <subscribe node='blogs/princely_musings' jid='bernardo@denmark.lit'/>
  </pubsub>
  <error type='modify'>
    <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <invalid-jid xmlns='http://jabber.org/protocol/pubsub#errors'/>
  </error>
</iq>
]]></example>
  <p>Although the inclusion of application-specific error conditions introduces a great deal of flexibility, it may also lead to confusion regarding possible conditions. Therefore, this document defines a registry of application-specific error conditions, to be maintained by the <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note>. In addition, this document registers a namespace of 'urn:xmpp:errors' as a fallback namespace for generalized error conditions that are not specific to a particular protocol (e.g., &lt;stanza-too-big/&gt; as a particular form of the &lt;not-acceptable/&gt; condition).</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <section2 topic="Application-Specific Error Conditions Registry" anchor="registrar-conditions">
    <p>The XMPP Registrar maintains a registry of application-specific error conditions (see &lt;<link url="https://xmpp.org/registrar/errors.html">https://xmpp.org/registrar/errors.html</link>&gt;).</p>
    <p>All application-specific error conditions that are defined in XMPP Extension Protocol specifications MUST be included in this registry. Application-specific error conditions that are defined outside of the XMPP Standards Foundation's standards process (see <span class="ref"><link url="https://xmpp.org/extensions/xep-0001.html">XMPP Extension Protocols (XEP-0001)</link></span> <note>XEP-0001: XMPP Extension Protocols &lt;<link url="https://xmpp.org/extensions/xep-0001.html">https://xmpp.org/extensions/xep-0001.html</link>&gt;.</note>) MAY be included in this registry, but it is not required for them to be so registered.</p>
    <section3 topic="Registration Process" anchor="registrar-conditions-process">
      <p>In order to submit new values to this registry, the registrant shall define an XML fragment of the following form and either include it in the relevant XMPP Extension Protocol or send it to the email address &lt;registrar@xmpp.org&gt;:</p>
      <code><![CDATA[
<condition>
  <ns>the XML namespace that qualifies the condition</ns>
  <element>the XML element of the error condition</element>
  <desc>a natural-language description of the error condition</desc>
  <doc>the document in which the condition is specified</doc>
</condition>
]]></code>
      <p>The registrant may register more than one condition at a time, each contained in a separate &lt;condition/&gt; element.</p>
    </section3>
  </section2>
  <section2 topic="Protocol Namespaces" anchor="registrar-ns">
    <p>The <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> includes 'urn:xmpp:errors' in its registry of protocol namespaces.</p>
  </section2>
</section1>
<section1 topic="Security Considerations" anchor="security">
  <p>This document introduces no known security vulnerabilities.</p>
</section1>
<section1 topic="IANA Considerations" anchor="iana">
  <p>This document requires no interaction with the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</p>
</section1>
</xep>
