@@ -91,12 +91,12 @@ def get_api() -> Dict[str, Any]:
9191 return {"statusCode" : 200 , "body" : API }
9292
9393
94- def lambda_handler (event : Dict [str , Any ], context : Any = None ) -> Dict [str , Any ]:
94+ def lambda_handler (event : Dict [str , Any ], _context : Any = None ) -> Dict [str , Any ]:
9595 """
9696 AWS Lambda entry point. Dispatches based on API Gateway proxy 'resource' and 'httpMethod'.
9797 Args:
9898 event: The event data from API Gateway.
99- context : The mandatory context argument for AWS Lambda invocation.
99+ _context : The mandatory context argument for AWS Lambda invocation (unused) .
100100 Returns:
101101 A dictionary compatible with API Gateway Lambda Proxy integration.
102102 Raises:
@@ -124,5 +124,5 @@ def lambda_handler(event: Dict[str, Any], context: Any = None) -> Dict[str, Any]
124124 sys .exit ("TERMINATING" )
125125 return build_error_response (404 , "route" , "Resource not found" )
126126 except (KeyError , json .JSONDecodeError , ValueError , AttributeError , TypeError , RuntimeError ) as request_exc :
127- logger .error ("Request processing error: %s" , request_exc )
127+ logger .exception ("Request processing error: %s" , request_exc )
128128 return build_error_response (500 , "internal" , "Unexpected server error" )
0 commit comments