Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
aws, python
Lĩnh vực
backend, cloud

Hướng nghiên cứu

Bắt đầu bằng cách xác định entry point lambda_handler và method publication_approved, sau đó theo dõi cách giá trị errors được truyền giữa chúng. Issue không nêu publication_approved nên làm gì với errors, vì vậy hãy xác nhận hành vi dự kiến trước khi thay đổi code; hoàn tất khi parameter có cách sử dụng được định nghĩa và kiểm thử, hoặc được xóa nhất quán.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

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

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws-samples/aws-serverless-developer-experience-workshop-python

Tất cả issue của aws-samples/aws-serverless-developer-experience-workshop-python

Issue tương tự

Thêm issue về Python

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.