fix: a busy Tiny retries the whole delivery instead of sending the order without its seller
Some checks failed
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
Some checks failed
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -873,6 +873,9 @@ class TinyOrders:
|
||||
failed reading leaves the order without one: it must still go."""
|
||||
try:
|
||||
seller = (self.request('GET', f'/contatos/{contact_id}').get('vendedor') or {}).get('id')
|
||||
except TinyRateLimit:
|
||||
# Busy for a moment: the whole delivery is tried again, the seller with it.
|
||||
raise
|
||||
except TinyError as exc:
|
||||
logging.warning('Tiny: could not read the seller of contact %s: %s', contact_id, exc)
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user