-
Notifications
You must be signed in to change notification settings - Fork 498
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
Fixes processing 429s from SPs #2165
Conversation
@@ -145,6 +145,6 @@ function acquireExportJobs(maximumNumberOfConcurrentJobsAllowedInString, jobHear | |||
} | |||
|
|||
function throwTooManyRequestsError() { | |||
throw new Error(ErrorCodes.RequestEntityTooLarge, `The request could not be completed.`); | |||
throw new Error(429, `The request could not be completed.`); |
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.
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.
This const isn't in provided out of the box :( http://azure.github.io/azure-cosmosdb-js-server/DocDbWrapperScript.js.html
I could create our own, but it is still defined per proc
@@ -24,6 +24,7 @@ function hardDelete(resourceTypeName, resourceId, keepCurrentVersion) { | |||
|
|||
let deletedResourceIdList = new Array(); | |||
|
|||
throwTooManyRequestsError(); |
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.
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.
Thanks, that was my manual test :(
443ba96
to
60e6209
Compare
Description
Stored procedures return a statuscode 400 with a substatus when they fail. When this was a 429, we were not processing this correctly.
The errorcode in the SP was also not correct.
Related issues
Addresses [issue #].
Testing
Describe how this change was tested.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)