mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
Try re-post if idempotency key fails
This commit is contained in:
parent
17334de24a
commit
efa4ba63eb
1 changed files with 8 additions and 3 deletions
|
@ -816,9 +816,14 @@ function Compose({
|
|||
skipThreading: true,
|
||||
});
|
||||
} else {
|
||||
newStatus = await masto.v1.statuses.create(params, {
|
||||
idempotencyKey: UID.current,
|
||||
});
|
||||
try {
|
||||
newStatus = await masto.v1.statuses.create(params, {
|
||||
idempotencyKey: UID.current,
|
||||
});
|
||||
} catch (_) {
|
||||
// If idempotency key fails, try again without it
|
||||
newStatus = await masto.v1.statuses.create(params);
|
||||
}
|
||||
}
|
||||
setUIState('default');
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue