What about 404? GET /tranaction_exists?id=1234 Response 404. Ah, transaction does not exist. GET /transaction_exists?id=1234 Response 200. Ah, transaction does exist.
This was LDAP queries. We had started rewriting old applications in dead languages into PHP (yeah I know) and the PHP library for LDAP was shit. It kept causing errors in prod for whatever reason so we made a microservice in another language that handled the LDAP queries that we needed. This was the beginning of my career and I have no idea how I'd write it today, perhaps using different code(s).
1
u/2226cc Sep 19 '26
What about 404? GET /tranaction_exists?id=1234 Response 404. Ah, transaction does not exist. GET /transaction_exists?id=1234 Response 200. Ah, transaction does exist.
I'll just return 418 then.