# Error-reply Response

<table><thead><tr><th width="114.609375" align="center">Destination</th><th width="54.75262451171875" align="center"></th><th width="115.19964599609375" align="center">Source</th></tr></thead><tbody><tr><td align="center"><strong>Client</strong></td><td align="center"><strong>←</strong></td><td align="center"><strong>MTS</strong></td></tr></tbody></table>

In several specific cases, instead of a normal response (with content object types: ticket-reply, cancel-reply, cashout-reply, ext-settlement-reply, ticket-ack-reply, cancel-ack-reply, cashout-ack-reply, ext-settlement-ack-reply) MTS returns a response with content object type = error-reply. This happens when a request is rejected by the Date Plane Router (some possible errors include authorisation error, configuration error, or missing content) or an internal Data Plane error has occurred.

### Ticket structure <a href="#mtserrorreplyresponse-v3.0-ticketstructure" id="mtserrorreplyresponse-v3.0-ticketstructure"></a>

Like any other ticket, a response including an error-reply consists of an envelope and content.

**Envelope and Content table:**

The Envelope provides the Content's (Ticket placement response) context and contains the following fields (besides Content):

* correlationId
* timestampUtc
* operation
* version

<table data-full-width="true"><thead><tr><th width="351.3038330078125">Example</th><th width="135.7872314453125">Field Name</th><th>Field Description</th><th width="100">Mandatory/ Optional</th><th width="100">Data Type</th></tr></thead><tbody><tr><td><pre><code>{
</code></pre></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><pre><code>  "content": {
        ........
        ........
   },    
</code></pre></td><td>content</td><td>See Content object description below</td><td>M</td><td>Object</td></tr><tr><td><pre><code>  "correlationId": "Uw59kwUL",
</code></pre></td><td>correlationId</td><td>The same string as submitted by client in the Ticket placement request</td><td>M</td><td>String</td></tr><tr><td><pre><code>  "timestampUtc": 1678202889000,
</code></pre></td><td>timestampUtc</td><td>Timestamp of response placement (Unix time in milliseconds format),<br>minimal: 1,<br>maximum: 9223372036854776000</td><td>M</td><td>Integer</td></tr><tr><td><pre><code>  "operation": "ticket-placement",
</code></pre></td><td>operation</td><td>The same operation as the initial request is returned.</td><td>M</td><td>String</td></tr><tr><td><pre><code>  "version": "3.0"
</code></pre></td><td>version</td><td>Indicates the ticket format version</td><td>M</td><td>String</td></tr><tr><td>}</td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table>

### Content object (error-reply response) <a href="#mtserrorreplyresponse-v3.0-contentcontentobject-error-replyresponse" id="mtserrorreplyresponse-v3.0-contentcontentobject-error-replyresponse"></a>

The Content object includes the following fields:

* type
* code
* message

<table data-full-width="true"><thead><tr><th width="351">Example</th><th width="122.015625">Field Name</th><th>Field Description</th><th width="100">Mandatory/ Optional</th><th width="100">Data Type</th></tr></thead><tbody><tr><td><pre><code>  "content": {
</code></pre></td><td><br></td><td><br></td><td><br></td><td>Object</td></tr><tr><td><pre><code>      "type": "error-reply",
</code></pre></td><td>type</td><td><br></td><td>M</td><td>String</td></tr><tr><td><pre><code>      "code": 100,
</code></pre></td><td>code</td><td>Data plane specific response code, see list below</td><td>M</td><td>Integer</td></tr><tr><td><pre data-overflow="wrap"><code>      "message": "Authorization error"
  },
</code></pre></td><td>message</td><td>Data plane specific response description, see list below</td><td>M</td><td>String</td></tr></tbody></table>

### Data plane specific response codes <a href="#mtserrorreplyresponse-v3.0-response_codesdataplanespecificresponsecodes" id="mtserrorreplyresponse-v3.0-response_codesdataplanespecificresponsecodes"></a>

<table><thead><tr><th width="223.587646484375">Code</th><th></th></tr></thead><tbody><tr><td>0</td><td>Transaction processed</td></tr><tr><td>100</td><td>Authorisation error</td></tr><tr><td>101</td><td>Associated identity not authorised for the requested transaction client identifier</td></tr><tr><td>200</td><td>Configuration error</td></tr><tr><td>201</td><td>Client/operator not configured</td></tr><tr><td>202</td><td>Client/operator configuration invalid</td></tr><tr><td>203</td><td>Client/operator not configured for requested operation</td></tr><tr><td>300</td><td>System limitation error</td></tr><tr><td>301</td><td>Transaction mapping failed(%s)</td></tr><tr><td>400</td><td>Precondition error</td></tr><tr><td>401</td><td>Client/operator input precondition failed(%s)</td></tr><tr><td>402</td><td>Downstream service precondition failed</td></tr><tr><td>900</td><td>Downstream service precondition failed</td></tr><tr><td>901</td><td>Internal system input precondition failed(%s)</td></tr><tr><td>902</td><td>Transaction target response contained an unsupported response code(%s)</td></tr></tbody></table>
