Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bug: publication_approved never accesses errors param

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
aws, python
Domain
backend, cloud

Research direction

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.

Written by the indexing model from the issue text.

Description

bug triage
Expected Behaviour

publication_approved method never access errors

Current Behaviour

No issue, parameter is never used

Code snippet
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

Dominant language
Python
Stars
47
Forks
20
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

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

All issues in aws-samples/aws-serverless-developer-experience-workshop-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.