BBC-1000: Improve the Github rate limit error during Repo syncing
Eduardo Murai Soares
Branch: BBC-1000-dcon-491-customer-is-probably-h
Branch: master
Merged
Merged pull request
Merged in BBC-1000-dcon-491-customer-is-probably-h (pull request #81)
Merged in BBC-1000-dcon-491-customer-is-probably-h (pull request #81)
If github rate limit is exceeded (5000 requests per hour) for authenticated github accounts (linked accounts) then the user currently see only a generic error message during syncing: "Sync Failed: Error during sync. See server logs. - ".
This scenario has been detected and message was improved :
Also the icon misalignment in the original error message has been fixed and "-" removed :
GithubCommunicator
has the main logic to detect the github rate limit error and then get then callGithubClientWithTimeout.getRateLimit()
to get the reset time and then re-throw the error as GithubRateLimitExceededException instance.MessageExecutor
andDefaultSynchronizer
will catch that exception and assemble the error message for the UI.bitbucket.js
will render the message in the UI.Despite we are no longer using the reset time to calculate the waiting period and rendering in the error message as initial planned, that info has been written to the log and may help the developer.