1

I have a logic app which is making a HTTP GET request to an API. HTTP is failing with the following error.

BadRequest. Http request failed as the content was not valid: 'Unable to translate bytes [9B] at index 790 from specified code page to Unicode.'

I am able to invoke the same API using Postman without an any error, however, I can see in the response that there are some unknown characters.

Does anyone know how I can work around this issue using Azure Logic Apps?

0

1 Answer 1

1

This problem was caused by the coding of the response from your api, postman will parse the response automatically but HTTP action in logic app will not do it. As I don't know the coding of your data, so just provide some suggestions for your reference.

1. Please check if the response data is in UTF-8. If not, you can use code like below to convert the response data in your api.

UTF8.decode(response.bodyBytes)

2. Add a field Accept in your HTTP action headers.

Accept: text/html;charset=US-ASCII, text/html;charset=UTF-8, text/plain;
charset=US-ASCII,text/plain;charset=UTF-8
Sign up to request clarification or add additional context in comments.

1 Comment

Try first: Accept: /

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.