Skip to content

Commit

Permalink
feat: cert expired alert (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect authored Jul 24, 2023
1 parent 5da23ee commit 0c80bd7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ZitiFirstStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,18 @@ class ZitiFirstStrategy extends CacheFirst /* NetworkFirst */ {
});

if (!response) {
throw new WorkboxError('no-response', {url: request.url});
this.logger.error(`no-response when trying to reach URL [${request.url}]`);

await this._zitiBrowzerServiceWorkerGlobalScope._requestFailedWithNoResponse({
url: request.url
});

let errResponse = new Response('', {
status: 500,
statusText: 'ServerError',
}
);
return errResponse;
}

const location = response.headers.get('Location');
Expand Down

0 comments on commit 0c80bd7

Please sign in to comment.