phani
10 years agoAdvisor
http.client.request throwing error for http response codes 400 and 404
Hi,
We are using http.client.reques FreeMatker context object to connect with third party API.
This FreeMarker context object throwing following error if the reponse coming from third party API contains 400 or 400 error codes.
Exception:
FreeMarker template error: Method "public final lithium.coreapi.webui.template.models.HttpClientResponseTemplateModel lithium.coreapi.webui.template.models.HttpClientRequestTemplateModel.get() throws freemarker.template.TemplateModelException" threw an exception when invoked on lithium.coreapi.webui.template.models.HttpClientRequestTemplateModel object "lithium.coreapi.webui.template.models.HttpClientRequestTemplateModel@69369a7a". See cause exception. The failing instruction (FTL stack trace): ---------- ==> #assign response = http.client.reques...
We even tried capture the error by using the 'response.hasError' method but in vain.
Your help could be highly appreciated.
Thanks & Regards,
Phani