My application uses twitter post status api - POST statuses/update to send new tweet. In a specific case, twitter api returns “503” response code indicating that twitter server is up but overloaded. My application deems this as “Tweet not sent” and after a while, tries again to send same tweet and this time, twitter service is up but throws “Duplicate tweet” error. Looks like even though twitter servers were overloaded, my tweet was queued ?
If so, what’s the recommendation to handle 503 on the client so that we don’t hit duplicate tweet ?