Skip to content

Commit 8c4fadc

Browse files
update
1 parent 77a6747 commit 8c4fadc

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

examples/react-oidc-demo/src/utils/timer.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const timer = (function () {
6060
const blob = new Blob(['(', workerCode, ')()'], { type: 'application/javascript' });
6161
blobURL = URL.createObjectURL(blob);
6262
} catch (error) {
63+
console.warn(`Blob not available ${error.toString()}`);
6364
return null;
6465
}
6566
const isInsideBrowser = typeof process === 'undefined';
@@ -70,7 +71,7 @@ const timer = (function () {
7071
}
7172
} catch (error) {
7273
if (isInsideBrowser) {
73-
console.warn('SharedWorker not available');
74+
console.warn(`SharedWorker not available ${error.toString()}`);
7475
}
7576
}
7677
try {
@@ -80,7 +81,7 @@ const timer = (function () {
8081
}
8182
} catch (error) {
8283
if (isInsideBrowser) {
83-
console.warn('Worker not available');
84+
console.warn(`Worker not available ${error.toString()}`);
8485
}
8586
}
8687

packages/oidc-client-service-worker/src/utils/normalizeUrl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export function normalizeUrl(url: string) {
22
try {
33
return new URL(url).toString();
44
} catch (error) {
5-
console.error(`Failed to normalize url: ${url}`);
5+
console.error(`Failed to normalize url: ${url}`, error);
66
return url;
77
}
88
}

packages/oidc-client/src/initWorker.ts

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const initWorkerAsync = async (
125125
if (!navigator.serviceWorker.controller)
126126
await sendMessageAsync(registration)({ type: 'claim' });
127127
} catch (err) {
128+
console.warn(`Failed init ServiceWorker ${err.toString()}`);
128129
return null;
129130
}
130131

0 commit comments

Comments
 (0)