Skip to content

Commit

Permalink
feat: Render Error page if Controller certs are expired (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect authored Aug 2, 2024
1 parent 8cec19c commit c385b7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const ZITI_CONSTANTS =
'ZITI_EVENT_NESTED_TLS_HANDSHAKE_TIMEOUT': 'nestedTLSHandshakeTimeout',
'ZITI_EVENT_NO_CONFIG_PROTOCOL_FOR_SERVICE': 'noConfigProtocolForServiceEvent',
'ZITI_EVENT_WSS_ROUTER_CONNECTION_ERROR': 'WSSEnabledEdgeRouterConnectionErrorEvent',
'ZITI_EVENT_CONTROLLER_CONNECTION_ERROR': 'ControllerConnectionErrorEvent',

/**
* Name of event indicating encrypted data for a nestedTLS connection has arrived and needs decryption
Expand Down
6 changes: 6 additions & 0 deletions src/context/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -1095,8 +1095,14 @@ class ZitiContext extends EventEmitter {
*/
async listControllerVersion() {

let self = this;

let res = await this._zitiBrowzerEdgeClient.listVersion({
}).catch((error) => {
// Let listeners know we failed to connect to the Controller
self.emit(ZITI_CONSTANTS.ZITI_EVENT_CONTROLLER_CONNECTION_ERROR, {
controllerApi: self.controllerApi,
});
throw error;
});

Expand Down

0 comments on commit c385b7d

Please sign in to comment.