aws-samples / aws-samples/aws-serverless-developer-experience-workshop-python

Bug: publication_approved never accesses errors param

未关闭
#30 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug triage
主要语言
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_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。