{% extends "SsoHelpBundle:Layout:base.html.twig" %}

{% block title %}{{ parent() }} - Error Codes{% endblock %}

{% block body %}
    <h1>Error Codes</h1>
    <p><strong>The error codes has been changed since last version. Please update your application!</strong></p>
    <p>If you receive an error, your xml response may look like this:</p>
    <pre>&lt;SsoResponse&gt;
  &lt;Status&gt;Failure&lt;/Status&gt;
  &lt;Trackid&gt;38b04edcbd&lt;/Trackid&gt;
  &lt;Date&gt;2014-07-25T08:58:00+02:00&lt;/Date&gt;
  &lt;User&gt;
    &lt;Add&gt;
      &lt;Status&gt;Failure&lt;/Status&gt;
      &lt;Errors&gt;
        &lt;Error&gt;
          &lt;ErrorCode&gt;&lt;![CDATA[u10]]&gt;&lt;/ErrorCode&gt;
          &lt;ErrorRef&gt;&lt;![CDATA[v001]]&gt;&lt;/ErrorRef&gt;
          &lt;ShortMessage&gt;&lt;![CDATA[Invalid email-address]]&gt;&lt;/ShortMessage&gt;
          &lt;LongMessage&gt;&lt;![CDATA[Email-address already in use.]]&gt;&lt;/LongMessage&gt;
        &lt;/Error&gt;
        &lt;Error&gt;
          &lt;ErrorCode&gt;&lt;![CDATA[u20]]&gt;&lt;/ErrorCode&gt;
          &lt;ErrorRef&gt;&lt;![CDATA[v001]]&gt;&lt;/ErrorRef&gt;
          &lt;ShortMessage&gt;&lt;![CDATA[Invalid username]]&gt;&lt;/ShortMessage&gt;
          &lt;LongMessage&gt;&lt;![CDATA[Username already in use.]]&gt;&lt;/LongMessage&gt;
        &lt;/Error&gt;
      &lt;/Errors&gt;
    &lt;/Add&gt;
  &lt;/User&gt;
    </pre>
    <p>
        The ErrorCode refers to an entry in this list.
        The ErrorRef helps us, to get further informations about your request.
        The ShortMessage contains a very short description of the error.
        And at least the LongMessage gives you detailed information about the error. It may differ from this list.
    </p>

    <table class="table">
        <tr>
            <th>Code</th>
            <th>Short message</th>
            <th>Long message</th>
        </tr>

        <tr>
            <td>h000</td>
            <td>Invalid remote address</td>
            <td></td>
        </tr>
        <tr>
            <td>x000</td>
            <td>Invalid xml</td>
            <td></td>
        </tr>
        <tr>
            <td>x001</td>
            <td>Invalid controller</td>
            <td>Cannot retrieve controller name from xml</td>
        </tr>
        <tr>
            <td>x002</td>
            <td>Invalid action</td>
            <td>Cannot retrieve action name from xml</td>
        </tr>
        <tr>
            <td>x003</td>
            <td>Invalid controller</td>
            <td>Check the manual for valid controllers</td>
        </tr>
        <tr>
            <td>x004</td>
            <td>Invalid action</td>
            <td>Action not allowed in current controller. Check the manual for valid actions</td>
        </tr>
        <tr>
            <td>x005</td>
            <td>Invalid xml-element</td>
            <td>Xml-element is not allowed in this context</td>
        </tr>
        <tr>
            <td>x006</td>
            <td>Invalid number of xml-elements</td>
            <td>Check number of allowed xml-elements</td>
        </tr>
        <tr>
            <td>x007</td>
            <td>Missing xml-element</td>
            <td>Required xml-element not found</td>
        </tr>
        <tr>
            <td>x008</td>
            <td>Missing credentials</td>
            <td>Missing credential nodes in xml. Check your xml</td>
        </tr>

        <tr>
            <td>c001</td>
            <td>Credentials error</td>
            <td>Invalid xml structure. See errors below</td>
        </tr>
        <tr>
            <td>c002</td>
            <td>Credentials error</td>
            <td>Controller Name seems to be empty</td>
        </tr>
        <tr>
            <td>c003</td>
            <td>Credentials error</td>
            <td>Remote Address seems to be empty</td>
        </tr>
        <tr>
            <td>c004</td>
            <td>Credentials error</td>
            <td>Controller Action seems to be empty</td>
        </tr>
        <tr>
            <td>c005</td>
            <td>Credentials error</td>
            <td>Invalid service token</td>
        </tr>
        <tr>
            <td>c006</td>
            <td>Credentials error</td>
            <td>Invalid ip address</td>
        </tr>
        <tr>
            <td>c007</td>
            <td>Credentials error</td>
            <td>Token has no permissions to do this request</td>
        </tr>
        <tr>
            <td>c008</td>
            <td>Credentials error</td>
            <td>Invalid user identifier</td>
        </tr>

        <tr>
            <td>u001</td>
            <td>Invalid user</td>
            <td>User not found in database</td>
        </tr>
        <tr>
            <td>u002</td>
            <td>Invalid user application</td>
            <td>User not linked to application</td>
        </tr>
        <tr>
            <td>u003</td>
            <td>Invalid user application</td>
            <td>User already linked to application</td>
        </tr>
        <tr>
            <td>u004</td>
            <td>Mutliple attribute</td>
            <td>Attribute is not a multi-value and may not be set more than once in a request</td>
        </tr>
        <tr>
            <td>u005</td>
            <td>Invalid token</td>
            <td>Token has expired</td>
        </tr>
        <tr>
            <td>u006</td>
            <td>Invalid attribute</td>
            <td>Attribute not found in database</td>
        </tr>
        <tr>
            <td>u007</td>
            <td>Invalid token</td>
            <td>User not found in database or password-token has expired</td>
        </tr>
        <tr>
            <td>u008</td>
            <td>Invalid role</td>
            <td>User not linked to application role</td>
        </tr>
        <tr>
            <td>u009</td>
            <td>User active</td>
            <td>User is already active. There is no need, to activeate user again</td>
        </tr>
        <tr>
            <td>u010</td>
            <td>Invalid token</td>
            <td>User not found in database or activation-token has expired</td>
        </tr>
        <tr>
            <td>a001</td>
            <td>Invalid application</td>
            <td>Application not found in database</td>
        </tr>
        <tr>
            <td>a002</td>
            <td>Invalid application role</td>
            <td>Role does not exist in application</td>
        </tr>
        <tr>
            <td>at001</td>
            <td>Invalid attribute</td>
            <td>Attribute already exists in database</td>
        </tr>
        <tr>
            <td>at002</td>
            <td>Invalid attribute</td>
            <td>Attribute not found in database</td>
        </tr>
        <tr>
            <td>ar001</td>
            <td>Invalid role</td>
            <td>Role already exists in database</td>
        </tr>
        <tr>
            <td>ar002</td>
            <td>Invalid role</td>
            <td>Role not found in database</td>
        </tr>
        <tr>
            <td>api1</td>
            <td>Internal error</td>
            <td></td>
        </tr>

        <tr>
            <td>a00</td>
            <td>Invalid application-id</td>
            <td>Application-id already in use</td>
        </tr>
        <tr>
            <td>a10</td>
            <td>Invalid application-name</td>
            <td>Application-name already in use</td>
        </tr>
        <tr>
            <td>a00</td>
            <td>Invalid application-id</td>
            <td>Application-id should not be empty</td>
        </tr>
        <tr>
            <td>a01</td>
            <td>Invalid application-id</td>
            <td>Application-id should have exactly 64 characters</td>
        </tr>
        <tr>
            <td>a10</td>
            <td>Invalid application-name</td>
            <td>Application-name should not be empty</td>
        </tr>
        <tr>
            <td>a11</td>
            <td>Invalid application-name</td>
            <td>Application-name cannot be longer than 127 characters</td>
        </tr>
        <tr>
            <td>a20</td>
            <td>Invalid application-description</td>
            <td>Application-description cannot be longer than 255 characters</td>
        </tr>
        <tr>
            <td>a30</td>
            <td>Roles dependencies</td>
            <td>There are role dependencies. Delete roles first</td>
        </tr>
        <tr>
            <td>a40</td>
            <td>Attribute dependencies</td>
            <td>There are attribute dependencies. Delete attributes first</td>
        </tr>
        <tr>
            <td>a50</td>
            <td>User dependencies</td>
            <td>There are users linked to application. Delete links first</td>
        </tr>
        <tr>
            <td>u00</td>
            <td>Invalid attribute-id</td>
            <td>Attribute-id already in use</td>
        </tr>
        <tr>
            <td>u00</td>
            <td>Invalid attribute-id</td>
            <td>Attribute-id already in use</td>
        </tr>
        <tr>
            <td>at00</td>
            <td>Invalid attribute-id</td>
            <td>Attribute-id should not be empty</td>
        </tr>
        <tr>
            <td>at01</td>
            <td>Invalid attribute-id</td>
            <td>Attribute-id should have exactly 64 characters</td>
        </tr>
        <tr>
            <td>at10</td>
            <td>Invalid attribute-name</td>
            <td>Attribute-name should not be empty</td>
        </tr>
        <tr>
            <td>at11</td>
            <td>Invalid attribute-name</td>
            <td>Attribute-name cannot be longer than 64 characters</td>
        </tr>
        <tr>
            <td>at20</td>
            <td>Invalid attribute-type</td>
            <td>Attribute-type must be 'one' or 'many'</td>
        </tr>
        <tr>
            <td>at30</td>
            <td>Missing application</td>
            <td>Attribute must be linked to an application</td>
        </tr>
        <tr>
            <td>ua00</td>
            <td>Invalid id</td>
            <td>UserApplication-id should not be empty</td>
        </tr>
        <tr>
            <td>ua01</td>
            <td>Invalid id</td>
            <td>UserApplication-id should have exactly 64 characters</td>
        </tr>
        <tr>
            <td>ua10</td>
            <td>Invalid application-name</td>
            <td>Application-name should not be empty</td>
        </tr>
        <tr>
            <td>ua11</td>
            <td>Invalid application-name</td>
            <td>Application-name cannot be longer than 127 characters</td>
        </tr>
        <tr>
            <td>ua20</td>
            <td>Missing User</td>
            <td>Users application must be linked to an user</td>
        </tr>
        <tr>
            <td>ua30</td>
            <td>Missing Application</td>
            <td>Users application value must be linked to an application</td>
        </tr>
        <tr>
            <td>ua40</td>
            <td>Attribute dependencies</td>
            <td>There are attribute dependencies. Delete attributes first</td>
        </tr>
        <tr>
            <td>ua50</td>
            <td>Role dependencies</td>
            <td>There are role dependencies. Delete roles first</td>
        </tr>
        <tr>
            <td>uaa00</td>
            <td>Invalid id</td>
            <td>UserApplicationAttribute-id should not be empty</td>
        </tr>
        <tr>
            <td>uaa01</td>
            <td>Invalid id</td>
            <td>UserApplicationAttribute-id should have exactly 64 characters</td>
        </tr>
        <tr>
            <td>uaa10</td>
            <td>Invalid attribute-name</td>
            <td>Attribute-name should not be empty</td>
        </tr>
        <tr>
            <td>uaa11</td>
            <td>Invalid attribute-name</td>
            <td>Attribute-name cannot be longer than 64 characters</td>
        </tr>
        <tr>
            <td>uaa20</td>
            <td>Invalid attribute-type</td>
            <td>Attribute-type should not be empty</td>
        </tr>
        <tr>
            <td>uaa21</td>
            <td>Invalid attribute-type</td>
            <td>Attribute-type must be 'one' or 'many'</td>
        </tr>
        <tr>
            <td>uaa30</td>
            <td>Missing User</td>
            <td>Attribute value must be linked to an user</td>
        </tr>
        <tr>
            <td>uaa40</td>
            <td>Missing Attribute</td>
            <td>Attribute value must be linked to an attribute</td>
        </tr>
        <tr>
            <td>uar00</td>
            <td>Invalid id</td>
            <td>UserApplicationRole-id should not be empty</td>
        </tr>
        <tr>
            <td>uar01</td>
            <td>Invalid id</td>
            <td>UserApplicationRole-id should have exactly 64 characters</td>
        </tr>
        <tr>
            <td>uar10</td>
            <td>Invalid role-name</td>
            <td>Role-name should not be empty</td>
        </tr>
        <tr>
            <td>uar11</td>
            <td>Invalid role-name</td>
            <td>Role-name cannot be longer than 64 characters</td>
        </tr>
        <tr>
            <td>uar20</td>
            <td>Missing User</td>
            <td>UserRole must be linked to an user</td>
        </tr>
        <tr>
            <td>uar30</td>
            <td>Missing Role</td>
            <td>UserRole value must be linked to an Role</td>
        </tr>
        <tr>
            <td>r00</td>
            <td>Invalid role-id</td>
            <td>Role-id already in use</td>
        </tr>
        <tr>
            <td>r00</td>
            <td>Invalid role-id</td>
            <td>Role-id should not be empty</td>
        </tr>
        <tr>
            <td>r01</td>
            <td>Invalid role-id</td>
            <td>Role-id should have exactly 64 characters</td>
        </tr>
        <tr>
            <td>r10</td>
            <td>Invalid role-name</td>
            <td>Role-name should not be empty</td>
        </tr>
        <tr>
            <td>r11</td>
            <td>Invalid role-name</td>
            <td>Role-name cannot be longer than 127 characters</td>
        </tr>
        <tr>
            <td>r20</td>
            <td>Invalid role-description</td>
            <td>Role-description cannot be longer than 255 characters</td>
        </tr>
        <tr>
            <td>r30</td>
            <td>Missing application</td>
            <td>Role must be linked to an application</td>
        </tr>
        <tr>
            <td>u00</td>
            <td>Invalid user-id</td>
            <td>User-id already in use</td>
        </tr>
        <tr>
            <td>u40</td>
            <td>Invalid GUID</td>
            <td>GUID already in use</td>
        </tr>
        <tr>
            <td>u10</td>
            <td>Invalid email-address</td>
            <td>Email-address already in use</td>
        </tr>
        <tr>
            <td>u20</td>
            <td>Invalid username</td>
            <td>Username already in use</td>
        </tr>
        <tr>
            <td>u01</td>
            <td>Invalid user-id</td>
            <td>User-id should not be empty</td>
        </tr>
        <tr>
            <td>u02</td>
            <td>Invalid user-id</td>
            <td>User-id should have exactly 64 characters</td>
        </tr>
        <tr>
            <td>u41</td>
            <td>Invalid GUID</td>
            <td>GUID should not be empty</td>
        </tr>
        <tr>
            <td>u42</td>
            <td>Invalid GUID</td>
            <td>Guid should have 64 characters or less</td>
        </tr>
        <tr>
            <td>u43</td>
            <td>Guid set</td>
            <td>You may specify ONLY one of Guid, Username, Email or Identifier. If you don't know, if it is a guid,
                username or email, use identifier
            </td>
        </tr>
        <tr>
            <td>u11</td>
            <td>Invalid email-address</td>
            <td>Email-address should not be empty</td>
        </tr>
        <tr>
            <td>u12</td>
            <td>Invalid email-address</td>
            <td>Email-address cannot be longer than 127 characters</td>
        </tr>
        <tr>
            <td>u13</td>
            <td>Invalid email-address</td>
            <td>The email-address is not a valid email</td>
        </tr>
        <tr>
            <td>u13</td>
            <td>Invalid email-address</td>
            <td>The email-address should not contain any whitespaces</td>
        </tr>
        <tr>
            <td>u14</td>
            <td>Email-address set</td>
            <td>You may specify ONLY one of Guid, Username, Email or Identifier. If you don't know, if it is a guid,
                username or email, use identifier
            </td>
        </tr>
        <tr>
            <td>u21</td>
            <td>Invalid username</td>
            <td>Username should not be empty</td>
        </tr>
        <tr>
            <td>u22</td>
            <td>Invalid username</td>
            <td>Username must be at least 5 characters or more</td>
        </tr>
        <tr>
            <td>u23</td>
            <td>Invalid username</td>
            <td>Username should have 127 characters or less</td>
        </tr>
        <tr>
            <td>u24</td>
            <td>Invalid username</td>
            <td>Username should not have any leading whitespaces</td>
        </tr>
        <tr>
            <td>u25</td>
            <td>Invalid username</td>
            <td>Username should not have any trailing whitespaces</td>
        </tr>
        <tr>
            <td>u26</td>
            <td>Username set</td>
            <td>You may specify ONLY one of Guid, Username, Email or Identifier. If you don't know, if it is a guid,
                username or email, use identifier
            </td>
        </tr>
        <tr>
            <td>u40</td>
            <td>Invalid firstname</td>
            <td>Firstname should not be empty</td>
        </tr>
        <tr>
            <td>u41</td>
            <td>Invalid firstname</td>
            <td>Firstname should have 127 characters or less</td>
        </tr>
        <tr>
            <td>u50</td>
            <td>Invalid lastname</td>
            <td>Lastname should not be empty</td>
        </tr>
        <tr>
            <td>u52</td>
            <td>Invalid lastname</td>
            <td>Lastname should have 127 characters or less</td>
        </tr>
        <tr>
            <td>u60</td>
            <td>Invalid active-flag</td>
            <td>Active flag must be 1 or 0</td>
        </tr>
        <tr>
            <td>u70</td>
            <td>Invalid Identifier</td>
            <td>Identifier should not be empty. Fill with GUID, username or email-address</td>
        </tr>
        <tr>
            <td>u71</td>
            <td>Invalid Identifier</td>
            <td>Identifier should have 127 characters or less. Fill with GUID, username or email-address</td>
        </tr>
        <tr>
            <td>u72</td>
            <td>Identifier not empty</td>
            <td>You may specify ONLY one of Guid, Username, Email or Identifier. If you don't know, if it is a guid,
                username or email, use identifier
            </td>
        </tr>
        <tr>
            <td>u73</td>
            <td>Invalid identifiers</td>
            <td>You may specify one of Guid, Username, Email or Identifier</td>
        </tr>
    </table>


{% endblock %}

