I have a curious situation where I’m consistently getting 500 errors back when querying Gemini API using a fetch request. The curious thing is that I get a successful response using the identical request body in Postman. I’ve ensured all headers, generationConfig, and tools are identical (I’m using url_context). This behavior happened sporadically in the past few days with some fetch requests working, and more consistently as of yesterday. Any guidance?
Hello,
Welcome to the Forum!
A 500 error usually indicates a temporary server side issue. Please allow some time and then try again later.
Hey, appreciate the response. The curious thing wasn’t the 500 error, it was the very specific conditions under which I was getting the error.
Using Postman I was getting successful responses, but using fetch with the same headers and body I was getting an error. Using the fetch for this call had previously worked.
I resolved it by downgrading from pro-6-05 to pro-5-06.