cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

406 NotAcceptable

Hi,

I created a custom connector to an extrenal CRM system and I wan't to via their api pull all the customers. I have been able to do this in postman and in the custom connector when testing (I'm using an API key). 

 

I'm not sure what I'm doing wrong in flow but I get this in flow, I assume something maybe I should be sending that I'm not? I can't see what though as the test in powerapps works (i even get the customers returned there) on the connector page.

flowerror.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for the response, 

 

Yes I knew due to getting 406 that in the Flow  it isn't liking something i was sending. I had a suspicion that it was the Content-Type as it should be sent application/json. 


For some reason although not required in the Power Apps test section or postman I had to add in the header

Accept application/json (I was already sending Content-Type application/json) but I noticed on the response intially the content type was text/html which isn't correct.


So for clarity I had to add accept: application/json to the header for it to work. 

 

Thanks

 

Ryan

 

 

View solution in original post

4 REPLIES 4
Frequent Visitor

According to MDN (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406), this is an error produced by the server when the response it's trying to send doesn't conform to the format defined by one of your request headers. Put another way, your request asked for the response to be in British English but the server responded in Australian English. This isn't allowed.

According to MDN:

If a server returns such an error status, the body of the [error] message should contain the list of the available representations of the resources, allowing the user to choose among them.

The error message you received should contain a clue about the format of the response the server tried to send and the format your request told it to send.

The format defined in one or more of the following headers should match in both the request and the response:
Accept
Accept-Charset
Accept-Encoding
Accept-Language

Tony

Thanks for the response, 

 

Yes I knew due to getting 406 that in the Flow  it isn't liking something i was sending. I had a suspicion that it was the Content-Type as it should be sent application/json. 


For some reason although not required in the Power Apps test section or postman I had to add in the header

Accept application/json (I was already sending Content-Type application/json) but I noticed on the response intially the content type was text/html which isn't correct.


So for clarity I had to add accept: application/json to the header for it to work. 

 

Thanks

 

Ryan

 

 

View solution in original post

That's good to know. Glad you solved it.

Quick question: since Flow routes requests through Azure, how do monitor and debug network traffic?

That's good to know. Glad you solved it.

Quick question: since Flow routes requests through Azure, how do monitor and debug network traffic?

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,305)