Type Alias: ServiceEntrypointHandler<T>
ServiceEntrypointHandler<
T> = (context,abortController?) =>Promise<T>
Dispatch a service request to the action whose pattern matches its input, given to a ServiceEntrypoint. The promise resolves to the action's result; it rejects with a ControllerActionNotFoundException when no action matches, and with the error of the input validation, the access control or the action. Aborting the controller cancels the request: its result is dropped and the promise resolves to undefined; a request aborted before it starts is not run at all.
Type Parameters
T
T = unknown
Parameters
context
The request: its data, matched against the actions' patterns (the pattern keys are removed from the action's input).
abortController?
AbortController
Aborts the request, for example when its client disconnects.
Returns
Promise<T>
The action's result.