Skip to content

Commit

Permalink
Update plugin errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Jan 21, 2025
1 parent cd03bdf commit 27ca45d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/plugins/three/CesiumIonAuthPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,19 @@ export class CesiumIonAuthPlugin {

} );

// dispatch an error if we fail to refresh the token
this._tokenRefreshPromise
.catch( error => {

this.tiles.dispatchEvent( {
type: 'load-error',
tile: null,
error,
url,
} );

} );

}

return this._tokenRefreshPromise;
Expand Down
14 changes: 14 additions & 0 deletions src/plugins/three/GoogleCloudAuthPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,20 @@ export class GoogleCloudAuthPlugin {

} );

// dispatch an error if we fail to refresh the token
this._tokenRefreshPromise
.catch( error => {

this.tiles.dispatchEvent( {
type: 'load-error',
tile: null,
error,
rootURL,
} );

} );


}

return this._tokenRefreshPromise;
Expand Down

0 comments on commit 27ca45d

Please sign in to comment.