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

fix: keep filter from erroring when no events are found, additional c… #196

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

ts-amz
Copy link
Contributor

@ts-amz ts-amz commented Mar 20, 2024

Description

fix: keep filter from erroring when no events are found, additional cleanup

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (existing code being refactored)
  • This change includes a documentation update

Submission Checklist

  • CI dry-run passing
  • Integration tests passing locally
  • Change logs generated

@@ -190,7 +190,7 @@ export class FilterService {
private async listSubscriptionsForEvent(
ev: CommonEvent,
subscriptionMap: { [key: string]: SubscriptionItem[] }
) {
): Promise<SubscriptionItem[]> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should specify that it can return an undefined value. I also wonder, is there any value to returning an undefined value from this function? Why not return undefined as an empty array?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated it. Also, you are correct about the undefined value. I did not want to correct that here and the multiple other places it happens in this CR. This function, it's callers, and the functions it calls should be refactored in a few ways. It's in my notes of things to be addressed.

@ts-amz ts-amz requested a review from pcozzi March 20, 2024 14:42
@ts-amz ts-amz merged commit 779d4a1 into aws:main Mar 20, 2024
1 check passed
@ts-amz ts-amz deleted the evt_processor branch March 20, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants