cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
adamsharma
Level: Powered On

HTTP BadRequest Error when JSON Body Contains Certain Symbols

Hi all,

 

I have a Flow which contains a HTTP GET request which obtains data from a MySQL database, returning a JSON body full of values that were originally input by end users. I noticed that the Flow had failed a couple of times and investigation revealed the cause was a user had included the "£" (British Pound) symbol within one of their responses. Removing this made the Flow work fine.

 

Further investigation shows this also happens with the "¬" (don't ask me what that's called!), but seemingly no others, at least from a standard UK keyboard.

 

The error message is for the pound symbol is "BadRequest. Http request failed as the content was not valid: 'Unable to translate bytes [A3] at index 550 from specified code page to Unicode" and for the "¬" symbol it is "BadRequest. Http request failed as the content was not valid: 'Unable to translate bytes [AC] at index 550 from specified code page to Unicode".

 

I've spent hours trying to fix but to no avail, any chance anyone can help? Not being able to deal with a major currency symbol seems like a fairly substantial drawback!

1 ACCEPTED SOLUTION

Accepted Solutions
adamsharma
Level: Powered On

Re: HTTP BadRequest Error when JSON Body Contains Certain Symbols

So basically it seems the HTTP action just can't handle various characters within the ISO-8859-1 character set. We changed this to utf-8 within the API endpoint and now all works fine.

 

Will be quite frustrating if people are building Flows that interact with APIs over which they have no control though - I was lucky our IT department could add an additional header in to specify utf-8 output but I don't believe there's any other solution.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: HTTP BadRequest Error when JSON Body Contains Certain Symbols

 

Hi @adamsharma ,

 

Could you share a screenshot of the Flow configuration? In which action did this error occur?

From the current error message, it seems that these special symbols are not supported.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
adamsharma
Level: Powered On

Re: HTTP BadRequest Error when JSON Body Contains Certain Symbols

Hi @v-bacao-msft,

 

Sure no problem, although to be honest after redaction of sensitive details there's not much left as it's a very simple configuration!

 

The URI points to an endpoint on a Business Process Management system that returns a JSON body.

 

Flow_API_Config.jpgFlowAPIError.jpg

adamsharma
Level: Powered On

Re: HTTP BadRequest Error when JSON Body Contains Certain Symbols

Just to add, the exact same GET request in API Platform Postman returns perfectly fine, i.e:

 

postman_response.jpg

(The example I've used in these screenshots is ü with an umlaut, but the error message is exactly the same when it's a £ or a ¬ or seemingly any character after Unicode U+007E on the Character Map)

adamsharma
Level: Powered On

Re: HTTP BadRequest Error when JSON Body Contains Certain Symbols

So basically it seems the HTTP action just can't handle various characters within the ISO-8859-1 character set. We changed this to utf-8 within the API endpoint and now all works fine.

 

Will be quite frustrating if people are building Flows that interact with APIs over which they have no control though - I was lucky our IT department could add an additional header in to specify utf-8 output but I don't believe there's any other solution.

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,583)