General HTTP Error Response Body

tog_minusError Response Schema

The generic error response schema is as follows:

<xs:complexType name="responseError">

    <xs:complexContent>

        <xs:sequence>

   <xs:element name="alert" type="tns:alert"/>

   <xs:element name="errorID" type="xs:string"  minOccurs="1" maxOccurs="1"/>

        </xs:sequence>

    </xs:complexContent>

  </xs:complexType>

  <xs:complexType name="alert">

    <xs:sequence>

 <xs:element name="alertTitle" type="xs:string" minOccurs="1" maxOccurs="1"/>

 <xs:element name="alertMessageBody" type="xs:string"  minOccurs="1" maxOccurs="1"/>

 <!-- dissmisInMilliseconds: 0 = no auto dismiss, else dismiss after X milliseconds-->

 <xs:element name="dissmisInMilliseconds" type="xs:nonNegativeInteger"  minOccurs="1" maxOccurs="1"/>

 <xs:element ref="tns:alertButton" minOccurs="1" maxOccurs=" unbounded "/>

    </xs:sequence>

  </xs:complexType>

  <xs:element name="alertButton">

    <xs:complexType>

      <xs:sequence>

        <xs:element name="id" type="xs:string" />

        <xs:element name="alertButtonClientAction" type="tns:clientAction" minOccurs="0" maxOccurs="1"/>

        <xs:element name="alertButtonTitle" type="xs:string" minOccurs="1" maxOccurs="1"/>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

tog_minusError Example

In some error cases a specific error response body is produced, as illustrated in the following example:

"responseError": {

 "errorID": "errorID1",

 "alert" : {        

         "alertTitle": "alertTitle1",

         "alertMessageBody": "alertMessageBody1",

         "dismissInMilliseconds": "3000",

         "alertButtons": [

           {

                 "id": "id1",

                 "alertButtonTitle": "Retry",

                 "alertButtonClientAction": {

                           "action": "server://path?p1=v1",

                           "delayMillisecond": "0"

                       }                                             

           },

           {

                 "id": "id2",

                 "alertButtonTitle": "save",

                 "alertButtonClientAction": {

                           "action": "local://functionName?p1=v1",

                           "delayMillisecond": "0"

                       }                     

           }

         ]

 }

}

tog_minusValidation Error Example

This section presents a sample validation error on a smartphone page, followed by the JSON content that builds the UI representation.

Validation Error

{

  "responseError" : {

    "alert" : {

      "alertTitle" : "Mandatory fields must be provided\n",

      "alertMessageBody" : "Please provide missing input",

      "dismissInMilliseconds" : 5000,

      "alertButtons" : [ {

        "alertButtonTitle" : "OK"

      } ]

    },

    "errorId" : "Error"

  }

}