Open gkjohnson opened 2 weeks ago
For Cesium Ion the following is returned from the API:
HTTP Code 401 Unauthorized
Response
{
"code": "InvalidCredentials",
"message": "Invalid access token"
}
For Google Photorealistic Tiles the following seems to be returned:
HTTP Code 400 Bad Request
Reponse
[{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}]
Add an override for "fetch" so we can detect when requests fail, fetch a new token, and retry.
After a certain amount of time (hours) the Google Cloud and Cesium tokens expire and a new one must be requested once it fails. We need to understand how to procedurally determine if the token has expired.
From Cesium Ion API:
For Google Photorealistic Tiles:
Behavior should be dis-ableable with a "autoRefreshToken" setting.