MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / is_auth_error

Function is_auth_error

auth.py:27–45  ·  view source on GitHub ↗

Check if text contains Claude CLI authentication error messages. Uses case-insensitive pattern matching against known error messages. Args: text: Output text to check Returns: True if any auth error pattern matches, False otherwise

(text: str)

Source from the content-addressed store, hash-verified

25
26
27def is_auth_error(text: str) -> bool:
28 """
29 Check if text contains Claude CLI authentication error messages.
30
31 Uses case-insensitive pattern matching against known error messages.
32
33 Args:
34 text: Output text to check
35
36 Returns:
37 True if any auth error pattern matches, False otherwise
38 """
39 if not text:
40 return False
41 text_lower = text.lower()
42 for pattern in AUTH_ERROR_PATTERNS:
43 if re.search(pattern, text_lower):
44 return True
45 return False
46
47
48# CLI-style help message (for terminal output)

Callers 3

run_spec_creationFunction · 0.90
run_agentFunction · 0.90
_stream_outputMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected