IO-256 Improved Logging
This commit is contained in:
@@ -117,7 +117,9 @@ exports.default = async (req, res) => {
|
||||
ret.push({
|
||||
jobid: job.id,
|
||||
success: false,
|
||||
errorMessage: JSON.stringify(error),
|
||||
errorMessage:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -397,10 +399,15 @@ async function InsertInvoice(oauthClient, req, job, bodyshop, parentTierRef) {
|
||||
: {}),
|
||||
};
|
||||
|
||||
logger.log("qbo-receivable-objectlog", "DEBUG", req.user.email, job.id, {
|
||||
invoiceObj,
|
||||
});
|
||||
|
||||
try {
|
||||
const result = await oauthClient.makeApiCall({
|
||||
url: urlBuilder(req.cookies.qbo_realmId, "invoice"),
|
||||
method: "POST",
|
||||
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user