JSONError: Unexpected token '<' at 1:1 <!DOCTYPE html> ^

Hello, I’m receiving this error when making requests to postman after using the dev server host for our project. However, the code still works when I’m using local environment.

Anyone can help?

Hey @rlalbario

Welcome to the community!

I suppect that the requests are returning a html page rather that a JSON response, which is causing your test to fail.

What’s the status code of the request? Is it going to the correct route?

There’s not a lot of information to go off here - I would recommend editing and updating the question with more contextual information and perhaps some screenshots of what you’re seeing.

You need remember that people can’t see what’s in front of you so over explaining the issue is always better. :grin:

1 Like

Hey @dannydainton

Thanks for answering.

I’m still waiting for my colleagues because it seems our code in our dev server is not updated (maybe this is also the reason why the url that they provide is not working) and we are waiting for it to deploy. I’ll let you know if I still experience this problem after deployment.

Hi, I am also getting the following error while doing Data-driven testing.

Hi @security-observer-79, welcome to the community.

Seeing the screenshot, it seems you are getting 429 error, which means too many requests. Is there any rate limiting policy applied on your api. Due to this 429 it is giving html response. You may extract exact html from postman console.

Hello, @darkphoenix

From where I can check my rate limiting policy? How I will update it?

Kindly help me with that.

Hi @security-observer-79,

As per the screenshot, you are using dummy rest APIs to perform testing. Please find the link for the description of this error.

In the response header, there should be a value retry after, that will give u the info when the next request can be processed.

These validations are set at the server side, in order to have a check on requests coming from the same client.

Hope this helps.