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

Bug: publication_approved never accesses errors param

オープン
#30 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。