Getting random 400 Errors

Hi,

I’m using version 0.4 of the python client. I get random errors: 400 Client Error: Bad Request for url: https://api.tavily.com/search

When a request doesn’t work, the prompt contains the following string: “INTRAVIS Gesellschaft für Lieferungen und Leistungen von bildgebenden und bildverarbeitenden Anlagen und Verfahren mbH, located in Aachen (DE)”

However, some prompts that contain this string return no error.

This is very annoying behaviour and a potential dealbreaker for our company. Can you please help me out?

1 Like

I tried a bit more and found out, that it also happens for other prompts. The error seems to be appearing somewhat randomly.

Hello

To address the 400 Client Error: Bad Request, I recommend validating the input data to ensure it’s properly formatted and adheres to the API’s requirements. Double-check the API documentation to confirm that all required parameters are included and correctly formatted. Inspect the full response details for any additional error information, and test with different input variations to see if the issue is related to specific characters or content. Implement detailed logging of requests and responses to identify any patterns.

Hope it helps ! :slightly_smiling_face: