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

@@ -60,7 +60,7 @@ async def handler(request: ApiRequest, ctx: FlowContext[Any]) -> ApiResponse:
f"{len(entity_ids)} events emitted")
return ApiResponse(
status_code=200,
status=200,
body={
'status': 'received',
'action': 'update',
@@ -74,7 +74,7 @@ async def handler(request: ApiRequest, ctx: FlowContext[Any]) -> ApiResponse:
ctx.logger.error(f"Error: {e}")
ctx.logger.error("=" * 80)
return ApiResponse(
status_code=500,
status=500,
body={
'error': 'Internal server error',
'details': str(e)