on 10-30-2023 1:00 PM
Hi Experts,
Is it possible to get the value of http header and capture it as part of message processing log? Receiver system has this custom header that would contain a value like a message id of sort on their side. As mentioned, I need to capture the value as it is their reference especially when there are issues calling their APIs.
I am checking on the Error Handling tab of REST receiver adapter but I am not sure how to setup or would this require some custom code? Please advice.
Hi Joel,
You customize the response from REST WS if an error response is received.
You can also see custom message for specific unexpected header values but not the header values itself.
This is elaborately explained in this beautiful blog by alexander.bundschuh.
In case you face error you need to use postman to troubleshoot the issue.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anupam,
I have actually check Alex's first hand for my issue. However, as you mentioned as well the Error handling tab checks the header itself not the value. The value is what I need the most be exposed. It looks to me that there is no way around this for failed calls but do trace xpi_inspector.
Hi Joel,
Refer the below post.
https://answers.sap.com/questions/298237/rest-receiver-add-custom-http-header.html
Regards
Bhargava Krishna Talasila
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi bhargavakrishna.talasila,
Thanks for your input. However, my scenario is different. What I need to capture is the HTTP header values that are sent back by target system regardless of HTTP status codes. Right now I can only see this HTTP headers when successful but when failed like error 400 I cannot see them. I mean is similar way when testing in Postman we can see all response headers.
Highly appreciate further inputs into this I really to get that message id the target system sends back most especially for troubleshooting.
User | Count |
---|---|
74 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.