Repository navigation
feat(functions): add request cancellation to invoke via abortSignal - #1593
Merged
spydon merged 2 commits intoJul 15, 2026
Conversation
Wire an abortSignal Future through FunctionsClient.invoke so callers can cancel an in-flight request the idiomatic Dart way, mirroring PostgrestBuilder.abortSignal. Completing the future aborts the underlying HTTP request and throws RequestAbortedException. Implements functions.invocation.request_cancellation. SDK-1310
Vinzent03
approved these changes
Jul 13, 2026
Tr00d
approved these changes
Jul 15, 2026
spydon
deleted the
lukasklingsbo/sdk-1310-featfunctions-request-cancellation-for-invoke-flutter-sdk
branch
July 15, 2026 12:33
This was referenced Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds request cancellation to
FunctionsClient.invoke, closing the gap versus the canonical compliance matrix.invokenow accepts an optionalabortSignalFuture; completing it cancels the in-flight HTTP request and throwsRequestAbortedException, mirroring how the database client exposes cancellation throughPostgrestBuilder.abortSignal.This is done idiomatically with the
httppackage'sAbortableRequest/AbortableMultipartRequest(wiringabortTrigger), so it works for both regular and multipart invocations.RequestAbortedExceptionis re-exported from the package so callers can catch it.A per-invocation timeout is now expressible as
invoke(..., abortSignal: Future.delayed(duration)), so the previouslynot_applicablefunctions.invocation.timeoutnote is updated accordingly.Outcome
implemented
Reference
Mirrors the existing Dart
database.using_modifiers.request_cancellationidiom (PostgrestBuilder.abortSignal).Compliance matrix
functions.invocation.request_cancellation→ implemented (symbolFunctionsClient.invokeregistered)Tests
RequestAbortedExceptionRequestAbortedExceptionSDK-1310