IBM Support

Override error messages for unexpected exceptions

News


Abstract

You now have the ability to specify the message to return when an attempt to invoke the web service implementation code fails.

Content

You are in: IBM i Technology Updates > Welcome to IBM Integrated Web Services for i Technology Updates > Return payloads on error HTTP status codes

What is it?

A new web page that is shown for each procedure where you can specify a user-defined message and HTTP status code to be used when an unexpected error happens. In addition, you can also set the HTTP status code to return on a successful invocation of the web service implementation code, although on successful calls that HTTP status code specified here is overridden by any HTTP status code that the web service implementation code returns. Finally, you can specify the trim mode for character fields, which is the removal of leading or trailing spaces from character strings.
Specify procedure information panel

Why use it?

You can hide the details of the exception from clients, or give them more information on whom to contact when an unexpected error happens.
The trim mode gives you further options on how to handle character fields.

Availability

The support is enabled in the following HTTP group PTFs:

SF99713 Level 35 V7R2M0
SF99722 Level 22 V7R3M0
SF99662 Level 4   V7R4M0

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"HW1A1","label":"IBM Power Systems"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
13 April 2020

UID

ibm16174453