createReleaseHandler
createReleaseHandler(
options): (request) =>Promise<Response>
Defined in: packages/server/src/circuits/subscribe.ts:735
The release route: the token a session was given, back at its close.
Safe to call more than once. Every grant releases a NAMED claim, so a repeat is the same act once (fork ADR-0008) — a duplicate close, a proxy retry or an operator replaying a request all answer 200 and change nothing. The client still sends it at most once, but that is now a matter of not making a pointless request rather than of correctness.
403 rather than 200 on a refusal — see releaseStreamGrants for why a refused release must be visible. 401 when the caller has no subject, the same rule subscribe and re-mint follow: an unauthenticated call is a credential problem, and it is the one thing here a client could fix.
Parameters
Section titled “Parameters”options
Section titled “options”object & object
Returns
Section titled “Returns”(request) => Promise<Response>