Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
439cf2c
Keep failed sends visible in conversation on unary RPC transport errors
Fei2411 Dec 4, 2026
2977d47
Harden failed-send reconciliation, retry locking, and RPC delivery cl…
Fei2411 Dec 4, 2026
31173b5
Merge remote-tracking branch 'origin/dev' into fix/2299-rework-r2
Fei2411 Dec 4, 2026
e7210f1
Fix group rpcId receipts, legacy replay dedup, queue durability, send…
Fei2411 Dec 4, 2026
92d7ea6
Require durable requestId receipts, retry failed-send lazy chunk, and…
Fei2411 Dec 4, 2026
07d3b4f
Merge remote-tracking branch 'origin/dev' into fix/2299-rework-r2
Fei2411 Dec 4, 2026
5bbf720
Persist group ledger before inbox dequeue, unify ledger durability ev…
Fei2411 Dec 4, 2026
609fc66
Merge remote-tracking branch 'origin/dev' into fix/2299-rework-r5
Fei2411 Dec 5, 2026
e4a33f7
Hand off group inbox-to-ledger ownership atomically across DSH turns …
Fei2411 Dec 5, 2026
b45c381
Harden group inbox handover, pending dispatch recovery, and pre-step …
Fei2411 Dec 5, 2026
4e5832a
Merge origin/dev into fix/2299-rework-r5 and regenerate contracts
Fei2411 Dec 5, 2026
8006526
Merge remote-tracking branch 'origin/dev' into fix/2299-rework-r5
Fei2411 Dec 5, 2026
ec53081
Deduplicate ledger group dispatches on member receipt and persist sto…
Fei2411 Dec 5, 2026
d3de5df
Enforce cancellation and fail-closed receipt verification at group le…
Fei2411 Dec 5, 2026
ff2d62b
Harden parked room ledger wake recheck and add backoff retry for unre…
Fei2411 Dec 5, 2026
912e502
Release room ledger recovery claim and retry after opening round failure
Fei2411 Dec 5, 2026
89b74c3
Require persisted member receipt before marking group ledger dispatched
Fei2411 Dec 5, 2026
75d7ad0
Require persisted native user/message before room supersede or member…
Fei2411 Dec 5, 2026
8138b46
Share ledger dispatch identity and persist stop across provisional ro…
Fei2411 Dec 5, 2026
0736a27
fix(ds-bot): decouple room supersede from member dispatch and bind pe…
Fei2411 Dec 5, 2026
91e14da
fix(ds-bot): hand off orphaned roomInbox posts on native turn exit an…
Fei2411 Dec 5, 2026
db37d00
fix(ds-bot): guarantee ledger prompt text, persist before roomInbox d…
Fei2411 Dec 5, 2026
5f9b1bc
fix(ds-bot): reconstruct failed ledger handovers per session, persist…
Fei2411 Dec 5, 2026
5db17ab
fix(groups): reconstruct rolled-back native turns from persisted even…
Fei2411 Dec 5, 2026
57d3603
fix(groups): handle unstarted/unknown relay crashes with identity ded…
Fei2411 Dec 5, 2026
41bc542
fix(groups): recover unfinished async group_relay rounds per member a…
Fei2411 Dec 5, 2026
9d7c403
fix(groups): bind round ownership to exact anchors/identities and res…
Fei2411 Dec 5, 2026
87d9570
fix(groups): enforce per-message userIdentities over shared relay anchor
Fei2411 Dec 5, 2026
30951cc
fix(groups): preserve persisted session-reference snapshots across ro…
Fei2411 Dec 5, 2026
ba19e94
fix(groups): isolate reference rounds bidirectionally and resolve eve…
Fei2411 Dec 5, 2026
a01e1cb
fix(groups): enforce unified reference-round isolation across drainRo…
Fei2411 Dec 5, 2026
ca440f2
fix(groups): hand over orphaned laterPosts user entries when ledger r…
Fei2411 Dec 5, 2026
8586269
fix(groups): bind reconstructed laterPosts user entries in-place to p…
Fei2411 Dec 5, 2026
1d5d037
fix(groups): preserve bound laterPosts FIFO across consecutive openin…
Fei2411 Dec 5, 2026
9a31eb0
fix(groups): hold FIFO behind unready head and cancel in-flight Bot c…
Fei2411 Dec 5, 2026
8be78b9
fix(groups): hold partial head FIFO, abort opening before call creati…
Fei2411 Dec 5, 2026
85d9ab9
fix(groups): enforce pending-head barrier, drain bot-only suffix, and…
Fei2411 Dec 5, 2026
7c1652c
fix(ds-bot): enforce pending-head FIFO on postToRoom/holdForNextRound…
Fei2411 Dec 5, 2026
d742f7b
fix(ds-bot): guard partial in-flight heads, keep completed room claim…
Fei2411 Dec 5, 2026
d6dc092
fix(ds-bot): tighten room handoff admission, cold FIFO recovery, and …
Fei2411 Dec 6, 2026
2006932
fix(ds-bot): preserve in-flight and cold-rebuild room FIFO barriers a…
Fei2411 Dec 6, 2026
3d49a4c
fix(ds-bot): guard concurrent unpersisted rebuilds and abort mixed st…
Fei2411 Dec 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Keep failed sends visible in conversation on unary RPC transport errors
Classify unary RPC transport failures by delivery phase (not-delivered vs delivered-unknown) in ds-bot/src/client/rpc-error.js and api.js, including mid-restart truncated response bodies and pre-send upload failures.

Persist transport send failures in FailedSendBar even when the composer is empty or the user switched chats, show reconnecting and delivery-unconfirmed status, forward mode/limits on Retry, surface VoiceMode send errors, and auto-reconcile delivered-unknown entries when SSE reconnect confirms the message landed.

Fixes #2299
  • Loading branch information
Fei2411 committed Dec 4, 2026
commit 439cf2c5710293f300228c48e0ab786655ebeb4b
632 changes: 632 additions & 0 deletions app/test/failed-send-recovery.test.mjs

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion app/ui/src/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
withdrawQueuedText,
} from './composer-area.js'
import { formatClassicFileMention } from './composer-menus.js'
import { revokeUrl } from './failed-send-bar.js'
import { reconcileFailedSends, revokeUrl } from './failed-send-bar.js'
import { ChatErrorBoundary } from './error-boundary.js'
import { queueRowText } from './queue-dock.js'
import { createClassicSessionData } from './classic-session-data.js'
Expand Down Expand Up @@ -345,6 +345,7 @@ export function Chat({ sessionId, team, registry, classic = false, onViewingSuba
const [composerRootEl, setComposerRootEl] = useState(null)
const scroller = useRef(null)
const seenQueuedIdsRef = useRef(new Set())
const activeChatKeyRef = useRef(null)

useEffect(() => {
sendGen.current += 1
Expand Down Expand Up @@ -374,6 +375,9 @@ export function Chat({ sessionId, team, registry, classic = false, onViewingSuba
}, [])

const clearPendingUsers = useCallback((freshUsers, initial) => {
if (activeChatKeyRef.current) {
reconcileFailedSends(activeChatKeyRef.current, freshUsers, initial)
}
setPending((list) => {
if (list.length === 0) return list
const next = list.slice()
Expand Down Expand Up @@ -687,6 +691,7 @@ export function Chat({ sessionId, team, registry, classic = false, onViewingSuba

const activeChatId = hooks.useRoster(r => chatOfSession(r, composerSessionId)?.id ?? null)
const activeChatKey = activeChatId ?? composerSessionId
activeChatKeyRef.current = activeChatKey
const onWithdraw = useCallback(
text => withdrawQueuedText({ chatId: activeChatId, chatKey: activeChatKey, sessionId: composerSessionId, text }),
[activeChatId, activeChatKey, composerSessionId],
Expand Down
84 changes: 58 additions & 26 deletions app/ui/src/composer-area.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { hasEscapeLayer } from '../../../ds-bot/src/client/overlay-hooks.js'
import { PasteCard, foldPastedText, pastedName } from '../../../ds-bot/src/client/paste-card.js'
import { mergeRescuedDraft, readRescuedForChat } from '../../../ds-bot/src/client/question-draft.js'
import { QuestionDock } from '../../../ds-bot/src/client/questions.js'
import { classifyRpcFailure } from '../../../ds-bot/src/client/rpc-error.js'
import { SecretDock } from '../../../ds-bot/src/client/secret-card.js'
import { matchSideEnter, parseSideLine, submitSide } from '../../../ds-bot/src/client/side-model.js'
import { STORAGE } from '../../../ds-bot/src/client/storage.js'
Expand All @@ -38,9 +39,11 @@ import {
clearFailedSends,
heldFailedUrls,
inFlightUrls,
notifyFailedSends,
pendingFailedByChat,
pruneFailedSends,
revokeUrl,
subscribeFailedSends,
trackFailedUrls,
trackInFlightUrls,
} from './failed-send-bar.js'
Expand Down Expand Up @@ -80,10 +83,12 @@ const EMPTY_OBJ = {}
const EMPTY_LIST = Object.freeze([])
const EMPTY_WORK = { bots: {}, approvals: [] }
const EMPTY_SESSIONS = { ids: [], byId: {} }
const CONNECTED_STATE = Object.freeze({ status: 'connected' })
const NO_OBJ_HOOK = selector => selector(EMPTY_OBJ)
const NO_LIST_HOOK = selector => selector(EMPTY_LIST)
const NO_WORK_HOOK = selector => selector(EMPTY_WORK)
const NO_SESSIONS_HOOK = selector => selector(EMPTY_SESSIONS)
const NO_CONN_HOOK = selector => selector(CONNECTED_STATE)

const MemoMemberDock = memo(MemberDock)
const MemoModelChoiceDock = memo(ModelChoiceDock)
Expand Down Expand Up @@ -668,10 +673,12 @@ export const Composer = memo(function Composer({
useSessions,
useSessionQueues,
useRescuedDrafts,
useConnection,
}) {
const roster = useRoster(value => value)
const sessions = (useSessions ?? NO_SESSIONS_HOOK)(value => value)
const sessionQueue = (useSessionQueues ?? NO_OBJ_HOOK)(map => map?.[sessionId] ?? EMPTY_LIST)
const reconnecting = (useConnection ?? NO_CONN_HOOK)(state => (state?.status ?? 'connected') !== 'connected')
const isRoomChat = Boolean(roster.roomsById?.[sessionId])
const isBotDm = Boolean(roster.byId?.[sessionId]) && !isRoomChat
const isTeamChat = Boolean(roster.byId?.[sessionId] || roster.roomsById?.[sessionId])
Expand Down Expand Up @@ -881,6 +888,13 @@ export const Composer = memo(function Composer({
setContinuingFailure(false)
}, [chatKey, draftScopeId])

useEffect(() => subscribeFailedSends((changedKey) => {
if (!mountedRef.current) return
if (changedKey === null || changedKey === chatKeyRef.current) {
setFailedSends(pendingFailedByChat.get(chatKeyRef.current) ?? [])
}
}), [])

// Load session controls (model, effort, permissions, plan, todos, goal, context meter).
// Slash commands & skills load lazily when `/` opens or is submitted so browsing cold
// Classic sessions never wakes their Agent on Host.
Expand Down Expand Up @@ -1425,6 +1439,7 @@ export const Composer = memo(function Composer({
const next = [...(pendingFailedByChat.get(targetKey) ?? []), entry]
pendingFailedByChat.set(targetKey, next)
if (mountedRef.current && chatKeyRef.current === targetKey) setFailedSends(next)
notifyFailedSends(targetKey)
}, [])

const removeFailedSend = useCallback((entryId, { revoke = false, targetKey = chatKeyRef.current } = {}) => {
Expand All @@ -1446,6 +1461,7 @@ export const Composer = memo(function Composer({
}
}
if (mountedRef.current && chatKeyRef.current === targetKey) setFailedSends(next)
notifyFailedSends(targetKey)
}, [])

const retryFailedSend = useCallback(async (entry) => {
Expand All @@ -1455,17 +1471,31 @@ export const Composer = memo(function Composer({
setError(null)
trackInFlightUrls(entry.items, true)
try {
await onSend(entry.text, entry.items)
const retryOptions = {
...(entry.mode ? { mode: entry.mode } : {}),
limits: attachmentLimitsOf(rosterRef.current),
}
await onSend(entry.text, entry.items, retryOptions)
trackInFlightUrls(entry.items, false)
removeFailedSend(entry.id, { revoke: false, targetKey })
} catch (failure) {
trackInFlightUrls(entry.items, false)
const msg = failure?.message ?? String(failure)
const { code: errCode, transport: isTransport, phase } = classifyRpcFailure(failure)
const next = (pendingFailedByChat.get(targetKey) ?? []).map(item => (
item.id === entry.id ? { ...item, error: msg } : item
item.id === entry.id
? {
...item,
error: msg,
...(errCode ? { code: errCode } : { code: undefined }),
phase,
transport: isTransport,
}
: item
))
if (next.length > 0) pendingFailedByChat.set(targetKey, next)
if (mountedRef.current && chatKeyRef.current === targetKey) setFailedSends(next)
notifyFailedSends(targetKey)
} finally {
if (mountedRef.current) setRetryingFailedId(cur => (cur === entry.id ? null : cur))
}
Expand Down Expand Up @@ -1541,6 +1571,7 @@ export const Composer = memo(function Composer({
if (nextList.length > 0) pendingFailedByChat.set(targetKey, nextList)
else pendingFailedByChat.delete(targetKey)
setFailedSends(nextList)
notifyFailedSends(targetKey)
setError(null)
const focusEnd = () => {
field.current?.focus?.()
Expand Down Expand Up @@ -1975,6 +2006,7 @@ export const Composer = memo(function Composer({
setAttachments([])
syncSavedQuotes(originChatKey, [])
const clearedRev = originDraftId ? writeDraft({ chatId: originDraftId, part: originSessionId, text: '', quotes: [], files: [] }) : null
const sentAt = Date.now()
trackInFlightUrls(items, true)
try {
const sendOptions = {
Expand All @@ -1991,6 +2023,7 @@ export const Composer = memo(function Composer({
} catch (failure) {
trackInFlightUrls(items, false)
const errMsg = failure?.message ?? String(failure)
const { code: errCode, transport: isTransport, phase } = classifyRpcFailure(failure)
const activeBot = rosterRef.current?.byId?.[sessionIdRef.current]
const activeRoom = rosterRef.current?.roomsById?.[sessionIdRef.current]
const isSameChat = chatKeyRef.current === originChatKey
Expand All @@ -2011,8 +2044,23 @@ export const Composer = memo(function Composer({
? { ...item, status: 'error', progress: 0, stagedId: null, uploadError: errMsg }
: item
))
const makeFailedEntry = () => ({
id: `fail-${++failedSendSeq}`,
text: value,
rawText: rawValue,
quotes: stagedQuotes.map(item => ({ quote: item.quote, note: item.note ?? '' })),
items: failedItems,
...(options?.mode ? { mode: options.mode } : {}),
error: errMsg,
...(errCode ? { code: errCode } : {}),
phase,
transport: isTransport,
time: sentAt,
})
if (!mountedRef.current || !isSameChat) {
if (originDraftId && lruGet(draftRevisions, originDraftId) === clearedRev && !(lruGet(draftQuotesByChat, originChatKey)?.quotes?.length > 0)) {
// Transport failures always land in FailedSendBar so returning to this chat surfaces
// an explicit failure state with Retry rather than silently downgrading to a draft.
if (!isTransport && originDraftId && lruGet(draftRevisions, originDraftId) === clearedRev && !(lruGet(draftQuotesByChat, originChatKey)?.quotes?.length > 0)) {
writeDraft({
chatId: originDraftId,
part: originSessionId,
Expand All @@ -2033,33 +2081,15 @@ export const Composer = memo(function Composer({
}
}
} else {
// A newer draft was written while this send was in flight: preserve the failed
// message in the recovery shelf so neither the new draft nor the failed send is lost.
pushFailedSend(originChatKey, {
id: `fail-${++failedSendSeq}`,
text: value,
rawText: rawValue,
quotes: stagedQuotes.map(item => ({ quote: item.quote, note: item.note ?? '' })),
items: failedItems,
error: errMsg,
time: Date.now(),
})
pushFailedSend(originChatKey, makeFailedEntry())
}
return
}
const userAlreadyTyping = textRef.current !== '' || (quotesRef.current?.length ?? 0) > 0 || (attachmentsRef.current?.length ?? 0) > 0
if (userAlreadyTyping) {
// User already started typing the next message: keep their active draft untouched
// and surface the failed message in the recovery shelf with Retry & Restore actions.
pushFailedSend(chatKeyRef.current, {
id: `fail-${++failedSendSeq}`,
text: value,
rawText: rawValue,
quotes: stagedQuotes.map(item => ({ quote: item.quote, note: item.note ?? '' })),
items: failedItems,
error: errMsg,
time: Date.now(),
})
if (isTransport || userAlreadyTyping) {
// Keep transport failures and interrupted drafts visible in the in-conversation
// recovery bar with Retry & Restore actions, persisting across chat switches.
pushFailedSend(chatKeyRef.current, makeFailedEntry())
return
}
setText(() => {
Expand Down Expand Up @@ -2344,6 +2374,7 @@ export const Composer = memo(function Composer({
h(FailedSendBar, {
items: failedSends,
disabled,
reconnecting,
retryingId: retryingFailedId,
onRetry: entry => { void retryFailedSend(entry) },
onRestore: restoreFailedSend,
Expand Down Expand Up @@ -2585,5 +2616,6 @@ export const ComposerArea = memo(function ComposerArea({
useSessions: hooks.useSessions,
useSessionQueues,
useRescuedDrafts: hooks.useRescuedDrafts,
useConnection: hooks.useConnection,
}))
})
1 change: 1 addition & 0 deletions app/ui/src/composer-classic.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
.dsb-failed-preview{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;font-weight:500;color:var(--bt-ink)}
.dsb-failed-att{flex:none;padding:1px 6px;border-radius:999px;background:var(--bt-hover);color:var(--bt-ink-2);font-size:11px;line-height:15px}
.dsb-failed-err{font-size:12px;line-height:16px;color:var(--bt-danger);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dsb-failed-meta{font-size:12px;line-height:16px;color:var(--bt-warn);overflow-wrap:anywhere}
.dsb-failed-acts{flex:none;display:inline-flex;align-items:center;gap:4px}
.dsb-failed-btn{height:28px;padding:0 10px;border:0;border-radius:999px;background:var(--bt-hover);color:var(--bt-ink);font:inherit;font-size:12px;line-height:16px;font-weight:500;cursor:pointer;white-space:nowrap;transition:background-color .12s ease}
.dsb-failed-btn:hover:not(:disabled){background:var(--bt-active)}
Expand Down
81 changes: 50 additions & 31 deletions app/ui/src/failed-send-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { createElement as h } from 'react'
import { t } from '../../../ds-bot/src/client/i18n.js'
import { CloseIcon } from '../../../ds-bot/src/client/icons.js'
import { DELIVERY_PHASE } from '../../../ds-bot/src/client/rpc-error.js'
export {
pendingFailedByChat,
heldFailedUrls,
Expand All @@ -13,6 +14,9 @@ export {
revokeUrl,
trackFailedUrls,
trackInFlightUrls,
subscribeFailedSends,
notifyFailedSends,
reconcileFailedSends,
pruneFailedSends,
clearFailedSends,
} from '../../../ds-bot/src/client/team-core/drafts.js'
Expand All @@ -26,42 +30,57 @@ function previewText(entry) {
return t('Message could not be sent')
}

export function FailedSendBar({ items, disabled = false, retryingId = null, onRetry, onRestore, onDismiss }) {
function statusNoteOf(entry, reconnecting) {
if (reconnecting) return t('Reconnecting…')
if (entry?.phase === DELIVERY_PHASE.DELIVERED_UNKNOWN) return t('Delivery unconfirmed — check before retrying')
return null
}

export function FailedSendBar({ items, disabled = false, reconnecting = false, retryingId = null, onRetry, onRestore, onDismiss }) {
if (!Array.isArray(items) || items.length === 0) return null
return h('div', { className: 'dsb-failed-list', 'data-failed-sends': '', role: 'region', 'aria-label': t('Failed to send') },
items.map((entry) => {
const busy = retryingId === entry.id
const attCount = entry.items?.length ?? 0
const hasText = String(entry.text ?? '').trim() !== ''
return h('div', { key: entry.id, className: 'dsb-failed-row', role: 'alert' },
h('span', { className: 'dsb-failed-dot', 'aria-hidden': true }),
h('div', { className: 'dsb-failed-copy' },
h('div', { className: 'dsb-failed-top' },
h('span', { className: 'dsb-failed-preview', title: entry.text || undefined }, previewText(entry)),
hasText && attCount > 0 ? h('span', { className: 'dsb-failed-att' }, attCount === 1 ? t('1 attachment') : t('{n} attachments', { n: attCount })) : null),
entry.error ? h('span', { className: 'dsb-failed-err' }, entry.error) : null),
h('div', { className: 'dsb-failed-acts' },
h('button', {
type: 'button',
className: 'dsb-failed-btn',
disabled: disabled || busy,
'aria-label': t('Retry send'),
onClick: () => onRetry?.(entry),
}, t('Retry')),
h('button', {
type: 'button',
className: 'dsb-failed-btn',
disabled: disabled || busy,
'aria-label': t('Restore failed message to input'),
onClick: () => onRestore?.(entry),
}, t('Restore to input')),
h('button', {
type: 'button',
className: 'dsb-failed-x',
disabled: busy,
'aria-label': t('Dismiss failed message'),
title: t('Dismiss'),
onClick: () => onDismiss?.(entry),
}, h(CloseIcon))))
const note = statusNoteOf(entry, reconnecting)
return h('div', {
key: entry.id,
className: 'dsb-failed-row',
role: 'alert',
'data-phase': entry.phase || undefined,
'data-reconnecting': reconnecting || undefined,
},
h('span', { className: 'dsb-failed-dot', 'aria-hidden': true }),
h('div', { className: 'dsb-failed-copy' },
h('div', { className: 'dsb-failed-top' },
h('span', { className: 'dsb-failed-preview', title: entry.text || undefined }, previewText(entry)),
hasText && attCount > 0 ? h('span', { className: 'dsb-failed-att' }, attCount === 1 ? t('1 attachment') : t('{n} attachments', { n: attCount })) : null),
entry.error ? h('span', { className: 'dsb-failed-err' }, entry.error) : null,
note ? h('span', { className: 'dsb-failed-meta' }, note) : null),
h('div', { className: 'dsb-failed-acts' },
h('button', {
type: 'button',
className: 'dsb-failed-btn',
disabled: disabled || busy,
'aria-busy': busy || undefined,
'aria-label': t('Retry send'),
onClick: () => onRetry?.(entry),
}, busy ? t('Retrying…') : t('Retry')),
h('button', {
type: 'button',
className: 'dsb-failed-btn',
disabled: disabled || busy,
'aria-label': t('Restore failed message to input'),
onClick: () => onRestore?.(entry),
}, t('Restore to input')),
h('button', {
type: 'button',
className: 'dsb-failed-x',
disabled: busy,
'aria-label': t('Dismiss failed message'),
title: t('Dismiss'),
onClick: () => onDismiss?.(entry),
}, h(CloseIcon))))
}))
}
14 changes: 12 additions & 2 deletions app/ui/src/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,20 @@ export function uploadAttachment(file, { isImage = false, mediaType = '', name =
}
const msg = body?.error?.message || `HTTP ${xhr.status}`
const code = body?.error?.code || 'bot/error'
finish(() => reject(Object.assign(new Error(msg), { code, status: xhr.status })))
const transport = xhr.status === 502 || xhr.status === 503 || xhr.status === 504
finish(() => reject(Object.assign(new Error(msg), {
code,
status: xhr.status,
...(transport ? { transport: true } : {}),
phase: 'not-delivered',
})))
}
xhr.onerror = () => {
finish(() => reject(Object.assign(new Error('Upload failed'), { code: 'bot/network' })))
finish(() => reject(Object.assign(new Error('Upload failed'), {
code: 'bot/network',
transport: true,
phase: 'not-delivered',
})))
}
xhr.onabort = () => {
finish(() => reject(makeAbort()))
Expand Down
Loading
Loading