Revert "IO-256 Genericize email."

This reverts commit fda3620ed0.
This commit is contained in:
Patrick Fic
2021-10-13 15:14:26 -07:00
parent fda3620ed0
commit d7b884ff86
3 changed files with 10 additions and 7 deletions

View File

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

View File

@@ -128,13 +128,14 @@ 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: JSON.stringify(error),
error: (error && error.authResponse.body) || JSON.stringify(error),
});
ret.push({
paymentid: payment.id,
success: false,
errorMessage: JSON.stringify(error),
errorMessage:
(error && error.authResponse.body) || JSON.stringify(error),
});
}
}

View File

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