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

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
Regular Visitor

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
v-bacao-msft
Community Support
Community Support

 

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.

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

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
Regular Visitor

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,500)