Tweak error report
This commit is contained in:
parent
eaf8b9cebc
commit
fec040e528
|
@ -80,7 +80,7 @@ const _codeFromURIString = (id: string, uriString: string): Code => {
|
||||||
const parseType = (url: URL): Code["type"] => {
|
const parseType = (url: URL): Code["type"] => {
|
||||||
const t = url.host.toLowerCase();
|
const t = url.host.toLowerCase();
|
||||||
if (t == "totp" || t == "hotp") return t;
|
if (t == "totp" || t == "hotp") return t;
|
||||||
throw new Error(`Unsupported code with host ${t}`);
|
throw new Error(`Unsupported code with host "${t}"`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const parseAccount = (url: URL): string | undefined => {
|
const parseAccount = (url: URL): string | undefined => {
|
||||||
|
|
|
@ -35,7 +35,7 @@ export const getAuthCodes = async (): Promise<Code[]> => {
|
||||||
);
|
);
|
||||||
return codeFromURIString(entity.id, decryptedCode);
|
return codeFromURIString(entity.id, decryptedCode);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.error(`failed to parse codeId = ${entity.id}`);
|
log.error(`Failed to parse codeID ${entity.id}`, e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue