refactor(logging): standardize status code handling and enhance logging in webhook and cron handlers

This commit is contained in:
bsiggel
2026-03-08 22:09:22 +00:00
parent a0cf845877
commit 1c765d1eec
15 changed files with 61 additions and 64 deletions

View File

@@ -63,7 +63,7 @@ async def handler(request: ApiRequest, ctx: FlowContext[Any]) -> ApiResponse:
f"{len(entity_ids)} events emitted")
return ApiResponse(
status_code=200,
status=200,
body={
'success': True,
'message': f'{len(entity_ids)} document(s) enqueued for sync',
@@ -79,7 +79,7 @@ async def handler(request: ApiRequest, ctx: FlowContext[Any]) -> ApiResponse:
ctx.logger.error("=" * 80)
return ApiResponse(
status_code=500,
status=500,
body={
'success': False,
'error': str(e)