CoSecProblemRenderer
Writes the body of CoSec's refusals as Wow's problems (wow.cosec.problems: wow, #6591), so a service that decides its requests itself answers them in one catalog. It writes the body alone: the status and every header stay CoSec's (Content-Type, CoSec-Request-Id, Retry-After, the RateLimit-* headers).
The type is Wow's (codeOf): 401
wow.auth.unauthenticated, 403wow.auth.forbidden, 400wow.request.malformed, 429wow.request.rate-limited, 503wow.auth.unavailable, and 500about:blank, as Wow answers an unexpected failure of its own.CoSec's own
typeandcodestay in the membercosec, and itsrequestIdandtraceIdunder their names, so a client that reads CoSec's problems readscosec.code(CoSec's TypeScript client reads the top-levelcode, and does not see these refusals: whoever uses it on the service keeps CoSec's bodies).A type of CoSec's Wow does not know, one a later CoSec adds, is written as CoSec writes it (ProblemRenderer.DEFAULT).
It runs on the thread that writes the response, an event loop, and only serializes; one that throws is replaced by CoSec's own body, and the request stays refused.