Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(aws sqs plugin): adds exception handling for ResourceClosedError errors #5601

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

mvilanova
Copy link
Contributor

@mvilanova mvilanova commented Dec 11, 2024

Changes to AWS SQS Signal Consumer Plugin

Added

  • New exception handling for ResourceClosedError
  • Import of ResourceClosedError from sqlalchemy.exc

Modified

  • Error message wording for general exception handler
  • Both error handlers now include signal name/variant info in logs

Details

New ResourceClosedError Handler

except ResourceClosedError as e:
    log.warning(
        f"Encountered an error when trying to create a signal instance. The plugin will retry again as the message hasn't been deleted from the SQS queue. Signal name/variant: {signal_instance_in.raw['name'] if signal_instance_in.raw and signal_instance_in.raw['name'] else signal_instance_in.raw['variant']}. Error: {e}"
    )
    db_session.rollback()
    continue

The changes improve error handling and logging consistency in the AWS SQS signal processing workflow.

@mvilanova mvilanova added the enhancement New feature or request label Dec 11, 2024
@mvilanova mvilanova merged commit 04292d9 into master Dec 11, 2024
10 checks passed
@mvilanova mvilanova deleted the feat/resource-closed-error branch December 11, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants