Glossary Item Box

Government Gateway 2.2.0 (MR-01) ISV Developer Help (Doc Version 06/03/08) | Send comments on this topic.

# Business Error Response

# Message Source/Destination

Gateway to Portal/Client application

#

# Processing

A Business Response Error occurs when a document submitted to the Gateway passes all schema/protocol validation performed by Gateway and then, when forwarded to the Department, is rejected because it does not conform to the business logic required by the back-end system – typically as a result of inconsistent data values provided in the XML elements in the Body.

As illustrated, the Gateway returns a Business Response Error message (with an Error/Type of business or fatal) to the client. The client must continue with the protocol sequence until a DELETE_RESPONSE has been received. The client should correct the error and re-submit as a new transaction.

Note: The elements in the message are mostly populated from the Business Error Response received from the Department.

# Message Structure

GovTalkMessage | MANDATORY. A default namespace specified as “http://www.govtalk.gov.uk/CM/envelope”.
EnvelopeVersion | MANDATORY. Set to 2.0 or 1.0 to the mirror EnvelopVersion value in the associated SUBMISSION_POLL.
Header | MANDATORY.
MessageDetails | MANDATORY.
Class | MANDATORY. Identifies the class of XML document contained within the Body of the originating submission – supplied in the SUBMISSION_REQUEST.
Qualifier | MANDATORY. Set to error.
Function | MANDATORY. Set to submit.
TransactionID | MANDATORY. If the SUBMISSION_REQUEST supplied a TransactionID it will be returned in this element. Otherwise element will be empty.
CorrelationID | MANDATORY. Populated with CorrelationID associated with original submission (i.e returned in the SUBMISSION_ACKNOWLEDGE) This value is used in the DELETE_REQUEST message.
ResponseEndPoint | MANDATORY. Contains a valid HTTP end point address. The PollInterval attribute will be set to an integer value. The Portal/client application can issue follow-on messages (e.g. DELETE_REQUEST or DATA_REQUEST) to this end-point.
Transformation | MANDATORY. Set to XML.
GatewayTimestamp | MANDATORY. Contains the time the message was generated.
SenderDetails | MANDATORY. Element will be empty.
GovTalkDetails | MANDATORY.
Keys | MANDATORY. Key elements will not be present.
TargetDetails | OPTIONAL.
Organisation | OPTIONAL. Populated with the Organisation element in the business response message returned from the Target Spoke (i.e Department). If present it will be contain a string between 1 and 64 characters in length.
GatewayValidation | OPTIONAL. Populated with the GatewayValidation element/sub-elements in the business response message returned from the Target Spoke (i.e Department).
ChannelRouting | OPTIONAL. Populated with the ChannelRouting element/sub-elements in the business response message returned from the Target Spoke (i.e Department). Target Spokes (i.e. Departments) may use this element and its sub-ordinates to communicate details of their application name and version together with any specific transaction ID values for this submission.
GovTalkErrors | MANDATORY. Can include multiple Error elements.
Error/RaisedBy | MANDATORY Set to department.
Error/Number | MANDATORY. This should be set to the value associated with the Error/Type (i.e. 3000 or 3001).
Error/Type | MANDATORY. Set to fatal (for 3000) or business (for 3001).
Error/Text | OPTIONAL. Contains additional information which should be of assistance in correcting the problem.
Error/Location | OPTIONAL. Contains location related information.
Body | MANDATORY. For business Error/Type the Body can contain detailed department specific error information. This structure of this data conforms to the Error-Response schema. This data is transparent to the Gateway.

# Samples

The mandatory elements within the following sample business error response request are shown in bold while optional elements appear in normal type.
<?xml version="1.0"?> <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope"> <EnvelopeVersion>1.0</EnvelopeVersion> <Header> <MessageDetails> <Class>MOSWTSC2</Class> <Qualifier>error</Qualifier> <Function>submit</Function> <TransactionID>20021202ABC</TransactionID> <CorrelationID> B07B9ED3176193DDC4EC39063848A927</CorrelationID> <ResponseEndPoint PollInterval=”2”> https://secure.gateway.gov.uk/submission </ResponseEndPoint> <Transformation>XML</Transformation> <GatewayTimestamp>2001-01-31T10:20:18.345</GatewayTimestamp> </MessageDetails> <SenderDetails/> </Header> <GovTalkDetails> <Keys/> <GovTalkErrors> <Error> <RaisedBy>department</RaisedBy> <Number>3001</Number> <Type>business</Type> <Text>Submission of document failed due to departmental business logic</Text> <Location>business</Location> </Error> </GovTalkErrors> </GovTalkDetails> <Body> <ErrorResponse xmlns=”http://www.govtalk.gov.uk/CM/errorresponse”> <Application> <Error> <RaisedBy>Some Department</RaisedBy> <Number>34567</Number> <Type>business</Type> <Text>Calculation mismatch</Text> <Location>MAFF</Location> </Error> ….. There may be many errors, not just a single error. </Application> </ErrorResponse> </Body> </GovTalkMessage>

© Crown Copyright 2008. All rights reserved