-
Notifications
You must be signed in to change notification settings - Fork 12
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
ACNA-961 | add cosmosDB 429 custom error handling #82
Conversation
Codecov Report
@@ Coverage Diff @@
## master #82 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 164 167 +3
Branches 32 33 +1
=========================================
+ Hits 164 167 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
lib/StateStoreError.js
Outdated
@@ -58,6 +59,7 @@ E('ERROR_BAD_ARGUMENT', '%s') | |||
E('ERROR_NOT_IMPLEMENTED', 'method `%s` not implemented') | |||
E('ERROR_BAD_CREDENTIALS', 'cannot access %s, make sure your credentials are valid') | |||
E('ERROR_PAYLOAD_TOO_LARGE', 'key, value or request payload is too large') | |||
E('ERROR_DB_RATE_LIMITED', 'db access requests rate limited') |
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.
We can change this to following
E('ERROR_REQUEST_RATE_TOO_HIGH', 'Request rate too high. Please retry after sometime.')
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.
Sure, this looks much better error code and message to be exposed to the user. I'll make the changes.
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.
lgtm
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.
LGTM
Description
This PR is to wrap the internal cosmosDB 429 error (thrown when more RUs are consumed than provisioned) and throw documented customized error known by state lib.
Related Issue
#58
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: