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: after serverless upgrade, GONE exceptions now throw an error #160

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

andreabadesso
Copy link
Collaborator

Motivation

Fixes https://github.com/HathorNetwork/internal-issues/issues/275

In serverless v3, ApiGatewayManagementApiClient throws an error on failures, our code was not ready to handle them, so we were never handling GONE exceptions and old connections were stacking up in redis because of what is described in the issue above.

Acceptance Criteria

  • We should be able to detect when a connection is already closed (GONE) and remove its handler from redis
  • We should alert on unhandled errors
  • We should include debug logs so we can keep track of how often this is happening (by filtering the log in cloudwatch)
  • We should not throw in sendMessageToClient so that the SQS event is removed from the queue (and not retried)

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged
  • Make sure either the unit tests and/or the QA tests are capable of testing the new features
  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso self-assigned this Apr 22, 2024
@andreabadesso andreabadesso added the bug Something isn't working label Apr 22, 2024
@andreabadesso andreabadesso merged commit d2fe54f into master Apr 23, 2024
1 check passed
@andreabadesso andreabadesso deleted the fix/handle-gone branch April 23, 2024 15:12
This was referenced Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants