I recently encountered an issue with my function called base
. Initially, everything was working perfectly fine as it would return a 200 status with the expected payload when I made a GET request via Postman to:
http://localhost:5001/api-name/region/base
.
However, things took a turn for the worse when I decided to add a query parameter to the URL. The moment I appended it like this:
http://localhost:5001/api-name/region/base?origin=localhost
, the request failed miserably and returned a 400 Bad Request error. What's intriguing is that while Postman quickly pointed out the issue with a 400 error, the Firebase emulator seemed oblivious to it and continued running the function until eventually timing out after 60 seconds.
Although I have set the function runtime options to accommodate requests up to 300 seconds (especially since it involves a hefty query that takes some time to process, and this works flawlessly without any parameters), it seems like the request isn't getting routed to the correct function or anywhere at all.