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

Bug: publication_approved never accesses errors param

Đang mở
#30 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug triage
Ngôn ngữ chính
Python
Star
47
Fork
20
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.