From adfc6e4f99876e788cf5b7776a0a1e38ecce9104 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 22 Feb 2021 04:25:22 -0800 Subject: [PATCH] Demote errors in CertificateProvider Summary: Errors and warnings are both shown to users. I'm applying the rule of thumb of using errors for non-recoverable problems that require *our* intervention. All of these errors can happen under normal circumstances. Reviewed By: mweststrate Differential Revision: D26577917 fbshipit-source-id: 12ba6725b6575bdf62141b01a16a5638c2c95701 --- desktop/app/src/utils/CertificateProvider.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/app/src/utils/CertificateProvider.tsx b/desktop/app/src/utils/CertificateProvider.tsx index a57ee1f05..535254fea 100644 --- a/desktop/app/src/utils/CertificateProvider.tsx +++ b/desktop/app/src/utils/CertificateProvider.tsx @@ -377,7 +377,7 @@ export default class CertificateProvider { return {id: device.id, ...result, error: null}; }) .catch((e) => { - console.error( + console.warn( `Unable to check for matching CSR in ${device.id}:${appName}`, logTag, ); @@ -394,7 +394,7 @@ export default class CertificateProvider { const foundCsrs = devices .filter((d) => d.foundCsr !== null) .map((d) => (d.foundCsr ? encodeURI(d.foundCsr) : 'null')); - console.error(`Looking for CSR (url encoded): + console.warn(`Looking for CSR (url encoded): ${encodeURI(this.santitizeString(csr))} @@ -404,7 +404,7 @@ export default class CertificateProvider { throw new Error(`No matching device found for app: ${appName}`); } if (matchingIds.length > 1) { - console.error( + console.warn( new Error('More than one matching device found for CSR'), csr, );