Retry Policy for Retrofit #76
Labels
enhancement
End user-perceivable enhancements.
Impact: Medium
Moderate perceived user impact (non-blocking bugs and general improvements).
Issue: Needs Clarification
Indicates that an issue needs more detail in order to be able to be acted upon.
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
Z-ibt
Temporary label for Ben to keep track of issues he's triaged.
The data module is responsible for all the API calls and there should be a retry policy when API call fails. Retrofit does not have retry policy by default. We should probably use OkHttp interceptor to solve this issue. We will be handling standard error codes centrally and the error codes 408-Request Timeout, 502-Bad Gateway, 503-Service Unavailable and 504-Gateway Timeout will result in exponential backoff policy with limited number of retries.
For example, we can have 3 retries (with 2, 4 and 10-second waits between successive retries). The exponential policy with limited retires will avoid overloading the Oppia backend and will also use limited mobile data of the user.
This is blocked on #5
The text was updated successfully, but these errors were encountered: