mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:57:20 +00:00
fix(plugin-workflow-request): fix response log (#4249)
This commit is contained in:
parent
9ca4b4584c
commit
45d9eca38b
@ -84,15 +84,20 @@ export default class extends Instruction {
|
|||||||
status: JOB_STATUS.RESOLVED,
|
status: JOB_STATUS.RESOLVED,
|
||||||
result: response.data,
|
result: response.data,
|
||||||
});
|
});
|
||||||
|
processor.logger.info(`request (#${node.id}) response success, status: ${response.status}`);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
job.set({
|
job.set({
|
||||||
status: JOB_STATUS.FAILED,
|
status: JOB_STATUS.FAILED,
|
||||||
result: error.isAxiosError ? error.toJSON() : error.message,
|
result: error.isAxiosError ? error.toJSON() : error.message,
|
||||||
});
|
});
|
||||||
|
if (error.response) {
|
||||||
|
processor.logger.info(`request (#${node.id}) response failed, status: ${error.response.status}`);
|
||||||
|
} else {
|
||||||
|
processor.logger.error(`request (#${node.id}) response failed: ${error.message}`);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
processor.logger.info(`request (#${node.id}) response received, status: ${job.get('status')}`);
|
|
||||||
this.workflow.resume(job);
|
this.workflow.resume(job);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user