MCPcopy Create free account
hub / github.com/codeaashu/claude-code / parseStatus

Function parseStatus

web/components/tools/ToolWebFetch.tsx:21–25  ·  view source on GitHub ↗
(result: string)

Source from the content-addressed store, hash-verified

19
20// Very rough HTTP status parsing from result text
21function parseStatus(result: string): number | null {
22 const m = result.match(/^(?:HTTP[^\n]*\s)?(\d{3})\b/m);
23 if (m) return parseInt(m[1], 10);
24 return null;
25}
26
27function StatusBadge({ code }: { code: number | null }) {
28 if (!code) return null;

Callers 1

ToolWebFetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected