on ‎2020 Apr 07 4:15 PM
Dear All
I am trying to get the http status code when an exception is called. I think i have the right groovy in place but getting the below error:
java.lang.NoSuchMethodException: No signature of method: com.sap.it.rt.adapter.openconnectors.exceptions.OpenConnectorsException.getStatusCode() is applicable for argument types: () values: []
The message properties:
My code:
def map = message.getProperties();
def ex = map.get("CamelExceptionCaught");
if (ex!=null) {
message.setHeader("HTTP_CODE", ex.getStatusCode());
}
Any help on this please?
Request clarification before answering.
Hello Prabhu,
Please refer to below help document which is applicable for HTTP adapter.
For open connector adapter you might need to white list all the headers in run time configuration and then check for the corresponding header which returning the error status code.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.