When calling FetchConfigsAsync web requests that complete with ‘IsHttpError’ or ‘IsNetworkError’ throw unhandled exceptions that bypass the intended functionality to load from RC cache.
Line 294 in ConfigManagerImpl clearly attempts to handle web request errors. However, line 292 has introduced an await call on the async operation object.
The GetAwaiter extension method for UnityWebRequestAsyncOperation provides an OnComplete callback that sets an exception (line 68 WebRequestExtension) if the response has ‘IsHttpError’ or ‘IsNetworkError’ set to true.
The ConfigManagerImpl is not expecting the exception to be thrown and so the following logic is bypassed with no cache loaded and no service relevant exception thrown that can easily be caught.
The exception thrown is also an internal class so I can only capture all exceptions instead of explicitly handling this edge case. Even if I could the functionality to load or save cache is marked as internal.
A bug has been reported for this but wanted to flag it here also.
Thanks,
Luke