We've encountered a few scenarios where the runtime (100.4) doesn't try to refresh an expired token for secured resources. The most recent one we've worked around is DownloadPreplannedOfflineMap from the DownloadPreplannedOfflineMapJob. It seems that the download doesn't try to refresh an expired token if the call returns a 498 status code.
Shortened stacktrace (removed our callstack):
System.Net.Http.HttpRequestException: Response status code does not indicate success: 498 ().
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
We've seen this exception occur in other offline scenarios but have since added other calls through the runtime that have alleviated the issue.
I have seen that the runtime does react to a 401 status code and the 498 is put in the response content, whereas in this issue's case the status code returned is 498.
Is there any way to get the runtime to react appropriately to the 498 when it is returned as a status code so that it will try to refresh the token? I'd like to be able to write a fix that encompasses the whole project rather than having to test every call to see if it will or will not refresh tokens.