Skip to content

Commit

Permalink
fix: add check for backend connectivity while validating credentials (#…
Browse files Browse the repository at this point in the history
…1443)

* fix: add check for backend connectivity while validating

* WIP
  • Loading branch information
AdiGajbhiye authored Oct 3, 2024
1 parent ebcd443 commit 3cabb35
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/validation_provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export class ValidationProvider implements Disposable {
}
return;
}
const connectivity = await this.altimate.checkApiConnectivity();
if (connectivity?.status !== "ok") {
this._isAuthenticated = false;
if (!silent) {
window.showErrorMessage("Unable to connect to altimate backend.");
}
return;
}
const validation = await this.altimate.validateCredentials(instance, key);
if (!validation?.ok) {
this._isAuthenticated = false;
Expand Down

0 comments on commit 3cabb35

Please sign in to comment.