aws-samples / aws-samples/aws-serverless-developer-experience-workshop-python
Bug: publication_approved never accesses errors param
- 主要語言
- Python
- 星號
- 47
- 分支
- 20
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### Expected Behaviour
publication_approved method never access `errors`
### Current Behaviour
No issue, parameter is never used
### Code snippet
```csharp
def lambda_handler(event, context):
"""Main entry point for Property Approval lambda function
Parameters
----------
event : API Gateway Lambda Proxy Request
The event passed to the function.
context : AWS Lambda Context
The context for the Lambda function.
Returns
-------
Success message upon successful storage of the approval outcome into DynamoDB
"""
logger.info(event)
errors = None if 'workflowErrors' not in event['detail'] else event['detail'].pop('workflowErrors')
# Deserialize event into strongly typed object
awsEvent:AWSEvent = Marshaller.unmarshall(event, AWSEvent) # type: ignore
detail:PublicationEvaluationCompleted = awsEvent.detail # type: ignore
return publication_approved(detail, errors)def lambda_handler(event, context):
"""Main entry point for Property Approval lambda function
Parameters
----------
event : API Gateway Lambda Proxy Request
The event passed to the function.
context : AWS Lambda Context
The context for the Lambda function.
Returns
-------
Success message upon successful storage of the approval outcome into DynamoDB
"""
logger.info(event)
errors = None if 'workflowErrors' not in event['detail'] else event['detail'].pop('workflowErrors')
# Deserialize event into strongly typed object
awsEvent:AWSEvent = Marshaller.unmarshall(event, AWSEvent) # type: ignore
detail:PublicationEvaluationCompleted = awsEvent.detail # type: ignore
return publication_approved(detail, errors)
```
### Possible Solution
_No response_
### Steps to Reproduce
N/A
### Debugging logs
_No response_
貢獻指南
研究方向
Start by locating the lambda_handler entry point and the publication_approved method, then trace how the errors value is passed between them. The issue does not state what publication_approved should do with errors, so confirm the intended behavior before changing code; done means the parameter has a defined, tested use or is removed consistently.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- aws, python
- 領域
- backend, cloud
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100