Using the Custom Connector's Test Function inside the edit will give me a successful 200 response with the correct data.
Implementing the Custom Connector inside a workflow fails with a generic Internal Server Error issue after about 10-15 minutes of retry.
This is a critical component for our development department. Your help is very much appreciated.
Hi @Anonymous is the connector actually making contact with the service on the other end? Are there any errors being thrown from the service which may help to isolate the issue?
Also, when executing the action from your automation, are you entering the details in manually or taking from dynamic content?
@MattWeston365 thanks for the response.
When sending it from the Test settings, we get appropriate logs on our side to validate it's good. When sending from an automate workflow (either manual or dynamic content) we can see that it hits our side but something is different in the fact that it doesn't return or give much more logs. My initial thought was that it was sending a different token, but I've verified its the same token both on test and implementation. My new theory is that has different headers between test/implementation? We're hitting another service that doesn't give us more details into than that.
It's just really strange to me that the test doesn't work like the implementation. Isn't that kinda the point of the test? We are going thru a gateway, but still to my point that the test works (same gateway) but implementation fails is a bit confusing to grasp.
Yes that is strange that you're seeing differences between the two methods of testing your connector, I'll admit I've never had an issue with different behaviours. Out of interest, are you using the same connection for both your connectors (in test) and also from your automation?
How much control do you have over the destination service? Are you able to build any further logging into it to aid with debugging?
Yeah, we are using the exact same connector. It is very odd. We don't have any additional logging that we can do against the end point (need to triple check this). I'm wondering if its the headers coming out of automate vs test-automate. Is there any way to see what both are sending?
Will also verify we have no more logging we can add in the meantime.
We can't see the inbound requests. Is there a way to see outbound request from these two sources? Would any sniffing/monitoring tool help me achieve this?
Yes, we were able to solve this a few days ago.
If you force headers in the Request Definition (See DEFINITION tab while creating connector) -> Import From Sample -> Headers.
Add Content-Type and Accept in the custom headers section. It seems the test definition's headers are created inside the browser and the actual Power Automate Flow implementation will use your swagger definition.
Once we added Accept - application/json inside our implementation it worked immediately as expected.
Hope this helps,
Thanks for the feedback I have tried as suggested and and added. Content-Type and Accept
Both adding "application/json; charset utf-8" or just "application/json"
But still I get the error. When I test from the connector it works 100% as expected...
See below for detail... Any other help would be greatly appreciated.