Default status codes and error responses

The response code and reason code set by an analyzer or converter program map to default status codes and associated responses. The status code and response can be modified by the user-replaceable Web error program DFHWBEP, which receives this information in a COMMAREA.

Attention: This topic contains Product-sensitive Programming Interface and Associated Guidance Information.

The HTTP protocol specifications define status codes that a server can return for the HTTP response when a request cannot be completed successfully. HTTP status code reference for CICS Web support gives information about these status codes.

For more information about the structure of HTTP responses, see HTTP responses.

Start of changeIf an error occurs during processing by an analyzer or converter program, the response and reason codes, along with other information, are passed to a Web error program in the COMMAREA to assist in determining an appropriate error response. For analyzer or converter program processing, a complete default error response, including the status code, is passed to the Web error program and can be modified by it. Error responses are accompanied by a CICS message and an exception trace entry.End of change

The default status code for response codes used by an analyzer program is as follows:
Table 1. Default status code for analyzer program processing error
wbra_response Default status code
any value other than URP_OK 400 Bad Request
The default status codes for a converter program are as follows:
Table 2. Default status codes for the converter's decode function
decode_response decode reason Default status code
URP_EXCEPTION URP_CORRUPT_CLIENT_DATA 400 Bad Request
URP_EXCEPTION URP_SECURITY_FAILURE 403 Forbidden
URP_EXCEPTION any other value 501 Not Implemented
URP_INVALID any value 501 Not Implemented
URP_DISASTER any value 501 Not Implemented
any other value any value 500 Internal Server Error
Table 3. Default status codes for the converter's encode function
encode_response encode_reason Default status code
Any value other than

URP_OK
URP_OK_LOOP

any 501 Not Implemented