fix: Changed Auth2 strategy
parent
12a87332f4
commit
7c05166f16
|
@ -78,7 +78,7 @@ const callJournaling = async (req, res) => {
|
|||
try {
|
||||
let { companyId, operation, crmPhone, crmAgent, crmCallDuration, crmFirstName, operationStatus } = req.body
|
||||
|
||||
// console.log('REQ.BODY CRM TESTe: ', JSON.stringify(req.body, null, 6))
|
||||
console.log(`[REQ.BODY - ${new Date()}] callJournaling: `, JSON.stringify(req.body, null, 6))
|
||||
|
||||
|
||||
// test remove
|
||||
|
@ -124,7 +124,21 @@ const callJournaling = async (req, res) => {
|
|||
|
||||
res.status(StatusCodes.OK).send()
|
||||
} catch (error) {
|
||||
console.log(`[ERROR - ${new Date()}] Erro no Call Journaling`, error?.response?.data)
|
||||
// console.log(`[ERROR - ${new Date()}] Erro no Call Journaling`, error?.response?.data)
|
||||
|
||||
if (error.response) {
|
||||
console.error('==================> callJournaling Erro na resposta da API:', {
|
||||
status: error.response.status,
|
||||
data: error.response.data,
|
||||
})
|
||||
}
|
||||
else if (error.request) {
|
||||
console.error('==================> callJournaling Nenhuma resposta recebida da API:', error.request)
|
||||
}
|
||||
else {
|
||||
console.error('==================> callJournaling Erro ao configurar a request:', error.message)
|
||||
}
|
||||
|
||||
res.status(StatusCodes.INTERNAL_SERVER_ERROR).send()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue