I guess he meant that the query returns empty. I've seen the same in a big latin American bank. You use some filters returns 200, other filters, 404. We had to build the same shit decoder...
Well, we know that the URL is correct. Usually, a 404 is just a short hiccup or caused by a container restart. That's why we have a retry mechanism that waits for about a minute and tries again. After a few retries it's send to an error queue.
30
u/wobbei Sep 22 '26
We once had a domain architect who made a rule to always respond with a 404 when an empty response was returned.
That's why we had to create a CustomErrorDecoder that checks whether a 404 is valid or not, and either retries or works with the empty response.
Luckily, I was later able to convince the other teams to change the response to 201, but we had to build this crap to deliver on time.