[object Object]

← back to Chief Of Operations

classify authenticated health endpoints

9614de00863f8a738722bef4bc521d6ca3668a25 · 2026-09-17 08:52:39 -0700 · Steve Abrams

Files touched

Diff

commit 9614de00863f8a738722bef4bc521d6ca3668a25
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Sep 17 08:52:39 2026 -0700

    classify authenticated health endpoints
---
 chief_ops.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/chief_ops.py b/chief_ops.py
index 2b40011..723ca22 100755
--- a/chief_ops.py
+++ b/chief_ops.py
@@ -31,6 +31,10 @@ def http_health(port, path='/health'):
     try:
         with urllib.request.urlopen(f'http://127.0.0.1:{port}{path}', timeout=2) as r:
             return {'ok': r.status == 200, 'body': json.loads(r.read().decode() or '{}')}
+    except urllib.error.HTTPError as e:
+        if e.code in (401, 403):
+            return {'ok': None, 'status': f'auth-required-{e.code}', 'error': str(e)}
+        return {'ok': False, 'error': str(e)}
     except Exception as e:
         msg = str(e)
         # Workspace sandboxes deny localhost sockets with EPERM. Keep that

← dfd6cd8 use free chief ops dashboard port  ·  back to Chief Of Operations  ·  add continuous DW-priority ticket supervision dd5f188 →