Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
Hi Pawan,
Per https://www.ibm.com/docs/en/api-connect/10.0.1.x?topic=policies-validate-jwt, this policy throws a RuntimeError. Your API can catch this error and update the status code to a 401 by updating context.message.statusCode = 401; or context.message.statusCode = '401 MyCustomReasonPhrase';
context.message.statusCode = 401
context.message.statusCode = '401 MyCustomReasonPhrase';
There are examples updating the statusCode in https://www.ibm.com/docs/en/api-connect/10.0.1.x?topic=aplc-using-context-variables-in-gatewayscript-xslt-policies-datapower-api-gateway.
Regards,
Steve Linn