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.
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