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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ded38d7869
commit
adfc6e4f99
@@ -377,7 +377,7 @@ export default class CertificateProvider {
|
|||||||
return {id: device.id, ...result, error: null};
|
return {id: device.id, ...result, error: null};
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(
|
console.warn(
|
||||||
`Unable to check for matching CSR in ${device.id}:${appName}`,
|
`Unable to check for matching CSR in ${device.id}:${appName}`,
|
||||||
logTag,
|
logTag,
|
||||||
);
|
);
|
||||||
@@ -394,7 +394,7 @@ export default class CertificateProvider {
|
|||||||
const foundCsrs = devices
|
const foundCsrs = devices
|
||||||
.filter((d) => d.foundCsr !== null)
|
.filter((d) => d.foundCsr !== null)
|
||||||
.map((d) => (d.foundCsr ? encodeURI(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))}
|
${encodeURI(this.santitizeString(csr))}
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ export default class CertificateProvider {
|
|||||||
throw new Error(`No matching device found for app: ${appName}`);
|
throw new Error(`No matching device found for app: ${appName}`);
|
||||||
}
|
}
|
||||||
if (matchingIds.length > 1) {
|
if (matchingIds.length > 1) {
|
||||||
console.error(
|
console.warn(
|
||||||
new Error('More than one matching device found for CSR'),
|
new Error('More than one matching device found for CSR'),
|
||||||
csr,
|
csr,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user