mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
6e54b52376
Every non-2xx body in the Functions project now goes through ResponseHelper (ErrorAsync / BadRequestAsync / NotFoundAsync / ForbiddenAsync / UnauthorizedAsync / ConflictAsync / InternalServerErrorAsync): 408 sites by a pattern-exact rewrite of the CreateResponse + WriteAsJsonAsync + return shape, 50 by hand. The eight private BadRequestAsync shadow helpers are gone; the raw 500 catch blocks use InternalServerErrorAsync (sanitized message, correlation id, MCP hint). 429s keep Retry-After via retryAfterSeconds. Specialised error bodies where a consumer reads more than the prefix: AppHomingDeniedResponse (kebab reason codes now Constants.AppHomingReasonCodes, probe result), TenantConfigPatchFailedResponse (backupId, drift), QueryBackendLogsErrorResponse (upstreamCode, statusCode, source, hint, upstream). Twenty-one message-first 200 bodies that the old error tolerance had let through are typed too (MessageResponse, PreviewWhitelistActionResponse, SuccessMessageResponse). New codes: PayloadTooLarge, UpstreamError, UpstreamTimeout, the three trial-gate codes; the agent security path (SecurityValidationExtensions) writes the envelope with the retry window. TypedResponseGuardTests: WriteBaseline is empty again — the anonymous WriteAsJsonAsync ratchet now covers error bodies with zero tolerated sites. Manifest and generated TypeScript regenerated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>