-
Notifications
You must be signed in to change notification settings - Fork 4k
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(application-generic): handle lock acquisition conflicts #6733
Conversation
throw new Error(`Failed to acquire lock for key: ${cacheKey}`); | ||
throw new ConflictException( | ||
`Failed to acquire cache lock. Please try again later.`, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a mistake to include cacheKey
in the log as it can expose server implementation details. We just return a simple error message. Note, it's still not ideal that cache issues should throw a client error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely!
✅ Deploy Preview for novu-stg-vite-dashboard-poc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
What changed? Why was the change needed?
409 Conflict Error
when a cache lock cannot be acquired.409
is commonly understood to be a retryable 4xx error, so this change is semantic.Screenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer