Repository navigation
v12.6.5
Patch Changes
-
#238
5310b93- Reject an aborted request with the reason of itssignal, and stop reporting it to theonErrorhookAn aborted
send()used to reject with aCcRequestErrorcarrying theABORTEDcode. It now rejects withsignal.reason, asfetch()does. That is aDOMExceptionnamedAbortError, unlessabort()was given another reason.ABORTEDis removed fromCC_REQUEST_ERROR_CODES.A stream whose request
signalaborts while it connects rejectsstart()the same way, instead of reconnecting when it has aretryconfiguration.To detect an abort, check the signal you passed rather than the error:
try { await client.send(command, { signal }); } catch (error) { - if (isCcRequestErrorWithCode(error, 'ABORTED')) { + if (signal.aborted) { return; } throw error; } -
#238
fc35d6a- Stop failing event streams opened at the same time on the same URLBoth streams used to fail before receiving any event, one with
SSE_SERVER_ERRORand the other with a lockedReadableStreamerror. -
#238
cb1ee89- Stop rejecting a request because an identical request sent at the same time was aborted -
#238
e6929ae- MakeCcNetworkError.isWorthRetrying()answer for the command of each caller when identical requests sent at the same time fail togetherA caller used to get the answer computed for the first one, even when its command declared a different idempotence.
-
#238
55c7ccb- Stop setting acauseon the errors raised without oneCcClientErrorand its subclasses used to carry acauseset toundefined, whichutil.inspect()printed. Thecauseof aDomainParseErroris no longer enumerable either, soJSON.stringify()and the spread operator leave it out, as they do for native errors. -
#238
55c7ccb- Name the errors the client throws after their classCcClientError,CcRequestError,CcNetworkError,CcHttpError,DomainParseError,PollingInterruptedErrorandPollingTimeoutErrorused to reportErroras theirname. Their stack traces andString(error)started withError:too. -
#240
ffc6d3b- Streams now reconnect in Firefox when the server cuts the connection mid-responseFirefox words that failure differently from the other engines, and the client did not recognise it as a
network failure. A stream hit it on every server restart, failed for good instead of retrying, and
rejected with a bareTypeErrorinstead of aCcNetworkError. -
#238
7b2b896- Stop failing a command because another command resolving the same owner or add-on id at the same time was aborted -
#238
2122126- Call theonErrorhook once per failedsend(), and never for an error a composite command recovers fromA composite command used to report an inner error twice. It also reported the errors it tolerates itself, such as the 404
ListDomainCommandgets for an application without a primary domain, or the 404 responses polled while waiting for a network group or a Kubernetes cluster. -
#238
7d1febc- Call theonErrorhook once per error, even when it rejects severalsend()callsResolving the owner or add-on id of a command used to report a failure twice. Identical
GETrequests sent at the same time share one request, and used to report a network failure or a timeout once per call. An HTTP error response is still reported once per call. -
#238
815a84a- Treat an option set toundefinedin a request or stream configuration as an absent optionIt now keeps the value it would have without it.
{ signal: controller?.signal }without a controller used to drop thesignalofdefaultRequestConfig, so aborting that signal no longer aborted the request. Likewise,timeout: undefinedmade a request fail at once withTIMEOUT_EXCEEDED, andisCorsEnabled: undefinedoverrode the value a command needs. -
#238
7da0732- Keep a stream from connecting onceclose()was calledA stream closed right after
start(), or while it reconnected, could still connect and stay open with no listeners. -
#238
d41c56e- Disable the retries of a stream when its configuration setsretrytonullBoth
client.stream(command, { retry: null })anddefaultStreamConfig: { retry: null }used to keep retrying with the retry configuration they were meant to override. -
#238
2e2b2f0- Close a stream when thesignalof its request aborts, whenever it abortsstart()now rejects withsignal.reasonas soon as the signal aborts: before the stream starts, while it reads events, while it is paused, or while it waits to reconnect. The stream used to ignore a signal aborted before it started. An abort while reading failed withSSE_SERVER_ERROR, or reconnected with aretryconfiguration. An abort while paused or waiting to reconnect only closed the stream at the next attempt. -
#238
7cb3fb2- Keepresume()from opening a second connection while a stream waits to reconnectBoth connections delivered their events, and
close()left one of them open.