fix(OpenAI Node): Descriptive errors (#6270)

This commit is contained in:
Michael Kret
2023-05-18 17:20:56 +03:00
committed by GitHub
parent 421949067b
commit 8fdfa3b6b8
5 changed files with 27 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import type { INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { sendErrorPostReceive } from './GenericFunctions';
export const textOperations: INodeProperties[] = [
{
@@ -22,6 +23,7 @@ export const textOperations: INodeProperties[] = [
method: 'POST',
url: '/v1/completions',
},
output: { postReceive: [sendErrorPostReceive] },
},
},
{
@@ -34,6 +36,7 @@ export const textOperations: INodeProperties[] = [
method: 'POST',
url: '/v1/edits',
},
output: { postReceive: [sendErrorPostReceive] },
},
},
{
@@ -46,6 +49,7 @@ export const textOperations: INodeProperties[] = [
method: 'POST',
url: '/v1/moderations',
},
output: { postReceive: [sendErrorPostReceive] },
},
},
],