IO-256 Improved Logging
This commit is contained in:
@@ -128,13 +128,17 @@ 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 && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
});
|
||||
|
||||
ret.push({
|
||||
paymentid: payment.id,
|
||||
success: false,
|
||||
errorMessage: JSON.stringify(error),
|
||||
errorMessage:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -187,6 +191,9 @@ async function InsertPayment(oauthClient, req, payment, parentRef) {
|
||||
},
|
||||
],
|
||||
};
|
||||
logger.log("qbo-payments-objectlog", "DEBUG", req.user.email, payment.id, {
|
||||
paymentQbo,
|
||||
});
|
||||
try {
|
||||
const result = await oauthClient.makeApiCall({
|
||||
url: urlBuilder(req.cookies.qbo_realmId, "payment"),
|
||||
|
||||
Reference in New Issue
Block a user