IO-256 Genericize email.

This commit is contained in:
Patrick Fic
2021-10-13 15:10:36 -07:00
parent 61ad9f0d58
commit fda3620ed0
3 changed files with 7 additions and 10 deletions

View File

@@ -78,8 +78,7 @@ exports.default = async (req, res) => {
ret.push({ ret.push({
billid: bill.id, billid: bill.id,
success: false, success: false,
errorMessage: errorMessage: JSON.stringify(error),
(error && error.authResponse.body) || JSON.stringify(error),
}); });
} }
} }
@@ -114,7 +113,7 @@ async function QueryVendorRecord(oauthClient, req, bill) {
); );
} catch (error) { } catch (error) {
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, { logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
error: (error && error.authResponse.body) || JSON.stringify(error), error: JSON.stringify(error),
method: "QueryVendorRecord", method: "QueryVendorRecord",
}); });
throw error; throw error;
@@ -137,7 +136,7 @@ async function InsertVendorRecord(oauthClient, req, bill) {
return result && result.Vendor; return result && result.Vendor;
} catch (error) { } catch (error) {
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, { logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
error: (error && error.authResponse.body) || JSON.stringify(error), error: JSON.stringify(error),
method: "InsertVendorRecord", method: "InsertVendorRecord",
}); });
throw error; throw error;
@@ -186,7 +185,7 @@ async function InsertBill(oauthClient, req, bill, vendor) {
return result && result.Bill; return result && result.Bill;
} catch (error) { } catch (error) {
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, { logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
error: (error && error.authResponse.body) || JSON.stringify(error), error: JSON.stringify(error),
method: "InsertBill", method: "InsertBill",
}); });
throw error; throw error;

View File

@@ -128,14 +128,13 @@ exports.default = async (req, res) => {
ret.push({ paymentid: payment.id, success: true }); ret.push({ paymentid: payment.id, success: true });
} catch (error) { } catch (error) {
logger.log("qbo-payment-create-error", "ERROR", req.user.email, { logger.log("qbo-payment-create-error", "ERROR", req.user.email, {
error: (error && error.authResponse.body) || JSON.stringify(error), error: JSON.stringify(error),
}); });
ret.push({ ret.push({
paymentid: payment.id, paymentid: payment.id,
success: false, success: false,
errorMessage: errorMessage: JSON.stringify(error),
(error && error.authResponse.body) || JSON.stringify(error),
}); });
} }
} }

View File

@@ -117,8 +117,7 @@ exports.default = async (req, res) => {
ret.push({ ret.push({
jobid: job.id, jobid: job.id,
success: false, success: false,
errorMessage: errorMessage: JSON.stringify(error),
(error && error.authResponse.body) || JSON.stringify(error),
}); });
} }
} }