feat(statuspage): serve public status pages from api snapshots
Pages render without JavaScript, are matched by verified custom domain or by slug, and stay available from a stale snapshot for ten minutes if the API is unreachable. Snapshots contain no targets or error details. Refs #21, #22 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
d820547e8c
commit
2b72715a9d
8 files changed
+1017
No files matched your search
@@ -147,6 +147,8 @@ func (c *Client) do(ctx context.Context, method, path string, in, out any) error
|
||||
switch {
|
||||
case resp.StatusCode == http.StatusUnauthorized:
|
||||
return ErrUnauthorized
|
||||
case resp.StatusCode == http.StatusNotFound:
|
||||
return ErrNotFound
|
||||
case resp.StatusCode >= 300:
|
||||
msg, _ := io.ReadAll(io.LimitReader(resp.Body, 1024))
|
||||
return fmt.Errorf("agentapi: %s %s: %d %s", method, path, resp.StatusCode, bytes.TrimSpace(msg))
|
||||
|
||||
Reference in new issue
Block a user