aws-samples / aws-samples/aws-serverless-developer-experience-workshop-python
Bug: publication_approved never accesses errors param
- Linguagem predominante
- Python
- Estrelas
- 47
- Forks
- 20
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### 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_
Guia de contribuição
Direção de pesquisa
Comece localizando o ponto de entrada lambda_handler e o método publication_approved; em seguida, rastreie como o valor errors é passado entre eles. A issue não informa o que publication_approved deve fazer com errors, portanto confirme o comportamento pretendido antes de alterar o código; a tarefa estará concluída quando o parâmetro tiver um uso definido e testado ou for removido de forma consistente.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- aws, python
- Domínio
- backend, cloud
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 25/100