Skip to content

Commit 6d717fb

Browse files
Nathan ParkerNathan Parker
authored andcommitted
match logging fixes
1 parent 1b80f8f commit 6d717fb

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/core/api/error_handlers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ async def validation_exception_handler(request: Request, exc: RequestValidationE
250250
"error_count": len(exc.errors()),
251251
},
252252
)
253-
253+
254254
# Also log at warning level with full details
255255
logger.warning(
256256
f"Request validation failed: {len(exc.errors())} error(s)",
@@ -288,7 +288,7 @@ async def http_exception_handler(
288288
"error_type": type(exc).__name__,
289289
},
290290
)
291-
291+
292292
# Also log at warning level for visibility
293293
logger.warning(
294294
f"HTTP {exc.status_code} error: {exc.detail}",
@@ -393,4 +393,3 @@ def create_success_response(
393393
data=data or {},
394394
metadata=metadata or {},
395395
)
396-

src/core/api/routes/match.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ async def match_requirements_to_capabilities(
167167
if not okh_manifest:
168168
# This should only happen if _extract_okh_manifest returns None
169169
# which means none of okh_manifest, okh_id, or okh_url were provided
170-
# (or okh_id/okh_url were provided but the resource wasn't found -
170+
# (or okh_id/okh_url were provided but the resource wasn't found -
171171
# those cases now raise 404 in _extract_okh_manifest)
172172
raise HTTPException(
173173
status_code=status.HTTP_400_BAD_REQUEST,
@@ -1021,7 +1021,7 @@ async def _extract_okh_manifest(
10211021
"okh_url_value": request.okh_url,
10221022
},
10231023
)
1024-
1024+
10251025
if request.okh_manifest:
10261026
# If it's already an OKHManifest object, return it directly
10271027
if isinstance(request.okh_manifest, OKHManifest):
@@ -1065,7 +1065,11 @@ async def _extract_okh_manifest(
10651065
# fetch_from_url raises ValueError if it fails
10661066
logger.warning(
10671067
f"Error fetching OKH manifest from URL: {str(e)}",
1068-
extra={"request_id": request_id, "okh_url": request.okh_url, "error": str(e)},
1068+
extra={
1069+
"request_id": request_id,
1070+
"okh_url": request.okh_url,
1071+
"error": str(e),
1072+
},
10691073
)
10701074
raise HTTPException(
10711075
status_code=status.HTTP_404_NOT_FOUND,

0 commit comments

Comments
 (0)