Skip to content

Commit

Permalink
feat: emit error page if wssER connections fail (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect authored Jul 9, 2024
1 parent 4c9d817 commit 099b869
Show file tree
Hide file tree
Showing 3 changed files with 540 additions and 57 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
]
},
"dependencies": {
"@openziti/ziti-browzer-core": "^0.40.5",
"@openziti/ziti-browzer-core": "^0.41.0",
"async-mutex": "^0.5.0",
"cheerio": "^1.0.0-rc.12",
"jwt-decode": "^3.1.2",
Expand Down
9 changes: 9 additions & 0 deletions src/ZitiFirstStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,14 @@ class ZitiFirstStrategy extends CacheFirst /* NetworkFirst */ {

}

async WSSEnabledEdgeRouterConnectionErrorEventHandler(wssERConnectionErrorEvent: any) {

this.logger.trace(`WSSEnabledEdgeRouterConnectionErrorEventHandler() `, wssERConnectionErrorEvent);

await this._zitiBrowzerServiceWorkerGlobalScope._wssERConnectionError(wssERConnectionErrorEvent);

}

async sessionCreationErrorEventHandler(sessionCreationErrorEvent: any) {

this.logger.trace(`sessionCreationErrorEventHandler() `, sessionCreationErrorEvent);
Expand Down Expand Up @@ -446,6 +454,7 @@ class ZitiFirstStrategy extends CacheFirst /* NetworkFirst */ {
this._zitiContext.on(ZITI_CONSTANTS.ZITI_EVENT_XGRESS, this.xgressEventHandler);
this._zitiContext.on(ZITI_CONSTANTS.ZITI_EVENT_NESTED_TLS_HANDSHAKE_TIMEOUT, this.nestedTLSHandshakeTimeoutEventHandler);
this._zitiContext.on(ZITI_CONSTANTS.ZITI_EVENT_NO_CONFIG_PROTOCOL_FOR_SERVICE, this.noConfigProtocolForServiceEventHandler);
this._zitiContext.on(ZITI_CONSTANTS.ZITI_EVENT_WSS_ROUTER_CONNECTION_ERROR, this.WSSEnabledEdgeRouterConnectionErrorEventHandler);


this.logger.trace(`_initialize: ZitiContext '${this._uuid}' initialized`);
Expand Down
Loading

0 comments on commit 099b869

Please sign in to comment.