# HTTP Proxy error response

**URL:** <https://forum.alumio.com/t/http-proxy-error-response/1167>\
**Category:** HTTP Proxies\
**Created:** [June 13, 2024, 7:08am UTC](https://forum.alumio.com/t/http-proxy-error-response/1167 "2024-06-13T07:08:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesse.wever](https://forum.alumio.com/user_avatar/forum.alumio.com/jesse.wever/32/296_2.png) [@jesse.wever](https://forum.alumio.com/u/jesse.wever)\
**Post date:** [June 13, 2024, 7:08am UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/1 "2024-06-13T07:08:15Z")

</div>

Hello all,  
I’m using the http proxy in Alumio but i’m struggling a bit with the response that it gives when something goes wrong with the connected system. Something that might be important to know is that this call is not being made by the proxy itself but in a http transformer inside a entity transformer since it needs to make a couple calls based on the data has been sent to the http proxy

In this case i make a call via the proxy to insert data but have some data that is not correct. In Alumio i see the following error:

```auto
{
  "error": {
    "code": "",
    "message": "An error has occurred.",
    "innererror": {
      "message": "Write failed for table row of type 'ReturnOrderHeaderV2Entity'. Infolog: Warning: The value '9999-99999' in field 'Customer account' is not found in the related table 'Customers'.; Warning: validateField failed on field 'ReturnOrderHeaderV2Entity.CustomerAccountNumber'.",
      "type": "Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataWriteException",
      "stacktrace": " at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateProcessor.CreateEntity_Save(ChangeOperationContext context, ChangeInfo changeInfo)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.ExecuteActionsInCompanyContext(IEnumerable`1 actionList, ChangeOperationContext operationContext)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.TrySave(ChangeOperationContext operationContext)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateManager.SaveChanges()\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataDelegatingHandler.<SaveChangesAsync>d__2.MoveNext()"
    }
  }
}

```

however when calling the proxy the response you get with the same data is:

```auto
{
    "status": 400,
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "title": "Bad Request",
    "detail": "Internal Server Error"
}

```

Is there a way that i can get Alumio to response with the first message.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Gugi](https://forum.alumio.com/user_avatar/forum.alumio.com/gugi/32/236_2.png) [@Gugi](https://forum.alumio.com/u/Gugi)\
**Post date:** [June 13, 2024, 12:25pm UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/3 "2024-06-13T12:25:12Z")

</div>

Hi @jesse.wever

Could you please confirm whether the response status code from the connected system is not `2XX`? If so, you can configure the HTTP client that does the call to not stop the process when it returns non-2xx responses. You can refer to the documentation below.

> [@How to prevent a process from failing when an HTTP request receives an error response](https://forum.alumio.com/t/how-to-prevent-a-process-from-failing-when-a-http-request-receives-an-error-response/1145):
>
> Table of contents Introduction Guide Introduction By default, Alumio will stop a process if it sends a request HTTP request to a web service and it returns an error. The error means the web service returns a response with status code 4xx or 5xx. However, there may be requirements when the integration should continue, even if some HTTP requests fail. For this reason, we have an option available in HTTP clients to not abort the process when receiving such errors. The option is called “Abort pro…

---

<div class="post-metadata">

**Author:** ![jesse.wever](https://forum.alumio.com/user_avatar/forum.alumio.com/jesse.wever/32/296_2.png) [@jesse.wever](https://forum.alumio.com/u/jesse.wever)\
**Post date:** [June 13, 2024, 1:07pm UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/4 "2024-06-13T13:07:50Z")

</div>

Hi @Gugi  
The response is indeed a 400. however the problem here is not that it stops but that it doesn’t give the information in the 400 error to the external system calling Alumio.

I have tried setting it to not stop on 400 and then using a conditional transformer followed by an error transformer, but it seems the error transformer only does hardcoded output so that doesn’t give the end user much useful information

---

<div class="post-metadata">

**Author:** ![Gugi](https://forum.alumio.com/user_avatar/forum.alumio.com/gugi/32/236_2.png) [@Gugi](https://forum.alumio.com/u/Gugi)\
**Post date:** [June 13, 2024, 1:11pm UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/5 "2024-06-13T13:11:31Z")

</div>

Thank you for clarifying. Could you please confirm whether you put the transformer in the Response processors?

---

<div class="post-metadata">

**Author:** ![jesse.wever](https://forum.alumio.com/user_avatar/forum.alumio.com/jesse.wever/32/296_2.png) [@jesse.wever](https://forum.alumio.com/u/jesse.wever)\
**Post date:** [June 13, 2024, 1:26pm UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/6 "2024-06-13T13:26:22Z")

</div>

No i didn’t, the reason is that the proxy needs to make multiple calls and the error is not happening in the proxy call so i didn’t think putting the transformer in the response would do what i wanted to.  
The setup currently is:

```auto
{
	http proxy, call to get the end result

	request processor {
		execute entity transformer {
			http call to insert header data
			http call to insert rows data
		}
	}

	response processor {}
}

```

if i understand you correclty would you then do the following:

```auto
{
	http proxy, call to insert header data

	request processor {}

	response processor {
	http call to insert rows data
	}
}

```

---

<div class="post-metadata">

**Author:** ![Gugi](https://forum.alumio.com/user_avatar/forum.alumio.com/gugi/32/236_2.png) [@Gugi](https://forum.alumio.com/u/Gugi)\
**Post date:** [June 13, 2024, 1:58pm UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/7 "2024-06-13T13:58:54Z")

</div>

You are correct. The request processor is unable to respond to the client as it is intended to modify the request to the connected system. Therefore, we recommend the latter implementation you mentioned above.

> [@jesse.wever](#):
>
> ```auto
> {
> http proxy, call to insert header data
> 
> request processor {}
> 
> response processor {
> http call to insert rows data
> }
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![jesse.wever](https://forum.alumio.com/user_avatar/forum.alumio.com/jesse.wever/32/296_2.png) [@jesse.wever](https://forum.alumio.com/u/jesse.wever)\
**Post date:** [June 13, 2024, 2:10pm UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/8 "2024-06-13T14:10:56Z")

</div>

alright, thanks for the info. will try the coming week if that does what we want

---

<div class="post-metadata">

**Author:** ![Gugi](https://forum.alumio.com/user_avatar/forum.alumio.com/gugi/32/236_2.png) [@Gugi](https://forum.alumio.com/u/Gugi)\
**Post date:** [June 13, 2024, 2:31pm UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/9 "2024-06-13T14:31:01Z")

</div>

Happy to help!

Sure thing. Feel free to let us know if you have further questions.

---

<div class="post-metadata">

**Author:** ![jesse.wever](https://forum.alumio.com/user_avatar/forum.alumio.com/jesse.wever/32/296_2.png) [@jesse.wever](https://forum.alumio.com/u/jesse.wever)\
**Post date:** [June 18, 2024, 6:35am UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/12 "2024-06-18T06:35:04Z")

</div>

hi Gugi,  
this was indeed the solution to my problem, thanks

---

<div class="post-metadata">

**Author:** ![Gugi](https://forum.alumio.com/user_avatar/forum.alumio.com/gugi/32/236_2.png) [@Gugi](https://forum.alumio.com/u/Gugi)\
**Post date:** [June 18, 2024, 12:35pm UTC](https://forum.alumio.com/t/http-proxy-error-response/1167/13 "2024-06-18T12:35:30Z")

</div>

Great to hear that it solved the problem.

I have quoted your solution to my reply above so that you can mark it as the solution.

Feel free to let us know if you have any other questions.
