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({
billid: bill.id,
success: false,
errorMessage:
(error && error.authResponse.body) || JSON.stringify(error),
errorMessage: JSON.stringify(error),
});
}
}
@@ -114,7 +113,7 @@ async function QueryVendorRecord(oauthClient, req, bill) {
);
} catch (error) {
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",
});
throw error;
@@ -137,7 +136,7 @@ async function InsertVendorRecord(oauthClient, req, bill) {
return result && result.Vendor;
} catch (error) {
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",
});
throw error;
@@ -186,7 +185,7 @@ async function InsertBill(oauthClient, req, bill, vendor) {
return result && result.Bill;
} catch (error) {
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",
});
throw error;

View File

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

View File

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