Skip to content
Playground(another site)

bynk.types.request_cookies_at_boundary

Error RequestCookies appears where a value is stored or sent: a field of a type, or a boundary such as a call, a message or an agent.

RequestCookies is the raw view of one request's cookies, the cookies parameter of a handler that needs a name a record field cannot spell, such as __Host-sid. Cookies often carry session credentials, so the view is read where the request arrives and never kept. It is accepted only as an HTTP handler's cookies parameter, and refused as a record, sum or event field, an agent key or store field, a capability operation, or any other handler parameter or result. Read the cookie you need (cookies.get("sid")) and keep that String.

Example

type Session = {
cookies: RequestCookies, // ✗ a request's cookies are not data to keep
}
type Session = {
sid: String, // ✓ keep the value you read
}

In the Book

See also

  • Every code in its category, Type checking, on the diagnostic index.
  • bynk explain bynk.types.request_cookies_at_boundary shows the same from the installed toolchain, without a network.