Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Then probably do not use 200. Instead, use 202 - accepted. Then return a state that says PENDING.


i don’t think this is really about 200 vs 202

even if you return 202 + pending, you still have the same issue underneath the outcome depends on work that happens outside the request

queues, retries, third party stuff, timing between systems

you can model it nicer in the api, but you still don’t really control when or if things actually finish the way you expect

that’s been the tricky part for me in production not the status code, but the gap between “request handled” and “did the thing actually happen”




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: