IBM Support

IT39882: CONTEXT.MESSAGE.STATUSCODE DO NOT SEND ERROR RESPONSE CODE TO ANALYTICS.

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • The code
    ---
    context.reject('CustomError', 'You are not authorized to make
    this API call');
    context.message.statusCode = '401 Unauthorized';
    ---
    send "200 OK" response code data to analytics server. The
    expected response code data to analytics server is 401 as
    specified in the code.
    

Local fix

  • Use code
    ---
    context.set('error.status.code', 403);
    context.set('error.status.reason', "Forbidden");
    context.reject("CustomError", "You don't have permission to
    access the URL on this server.");
    ---
    

Problem summary

  • Analytics log response code doesn't match context.reject()
    response code. Analytics log still reports "200 OK" for the code
     403 from context.reject().
    

Problem conclusion

Temporary fix

  • Use the code like below
    
    ---
    context.set('error.status.code', 403);
    context.set('error.status.reason', "Forbidden");
    context.reject("CustomError", "You don't have permission to
    access the URL on this server.");
    ---
    

Comments

APAR Information

  • APAR number

    IT39882

  • Reported component name

    DATAPOWER

  • Reported component ID

    DP1234567

  • Reported release

    A0X

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-02-07

  • Closed date

    2022-04-21

  • Last modified date

    2022-04-21

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DATAPOWER

  • Fixed component ID

    DP1234567

Applicable component levels

[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS9H2Y","label":"IBM DataPower Gateways"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A0X"}]

Document Information

Modified date:
22 April 2022