This is an IBM Automation portal for Integration products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
Hello Shahar,
Thanks for your comments. Yes indeed I am logging different error cases from an error rule with “Process Backend Errors" option turned off.
So there are ways for getting the response code in an error rule. However I am not dismissing that you are facing an issue here. I will send you an email to arrange a meeting so that we can further discuss.
Thank you.
Ulas
Hi,
I'm sorry but this is simply untrue.
I've tested it before and all I get in "hm.response.statusCode" and in "hm.response.reasonPhrase" is undefined.
It does work fine when "Process Backend Errors" option is turned on and you get the response rule invoked, but if this option is turned off, you find yourself in the error rule with no data.
You can see in the case that is attached to this idea my example. I have no idea, Ulas, I did you got the desired results.
Are you sure you logged these values from the error rule? and that the "Process Backend Errors" option was turned off? because that's just not working for me.
Thanks,
Shahar.
Hello,
When the response comes from the server, you get access to fields in the response headers in GatewayScript with assignment statements in original, current, or response headers.
…
var hm = require('header-metadata');
var statuscode = hm.original.statusCode;
var reasonphrase = hm.original.reasonPhrase;
….
https://www.ibm.com/docs/en/datapower-gateway/10.5.0?topic=module-status-codes-reason-phrases
Or in XSLT you can use
<xsl:value-of select="dp:http-response-header('x-dp-response-code')"/>
The x-dp-response-code special code is a protocol response code. This special code is not a response header, but contains the protocol-specific response code.
https://www.ibm.com/docs/en/datapower-gateway/10.5.0?topic=functions-dphttp-response-header
Then you can log or do something else according to your error handling logic... below screenshot shows an example of logging the response code logged in an error rule
Thanks
Ulas