mirror of
				https://github.com/n8n-io/n8n-nodes-starter.git
				synced 2025-10-31 07:12:25 -05:00 
			
		
		
		
	Add DO Gradient Serverless Inference Node
This commit is contained in:
		
					parent
					
						
							
								67ee5b8e80
							
						
					
				
			
			
				commit
				
					
						c3c675ff33
					
				
			
		
					 19 changed files with 5765 additions and 628 deletions
				
			
		
							
								
								
									
										18
									
								
								nodes/ServerlessInferenceNode/GenericFunctions.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								nodes/ServerlessInferenceNode/GenericFunctions.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| import type { | ||||
| 	IExecuteSingleFunctions, | ||||
| 	IN8nHttpFullResponse, | ||||
| 	INodeExecutionData, | ||||
| 	JsonObject, | ||||
| } from 'n8n-workflow'; | ||||
| import { NodeApiError } from 'n8n-workflow'; | ||||
| 
 | ||||
| export async function sendErrorPostReceive( | ||||
| 	this: IExecuteSingleFunctions, | ||||
| 	data: INodeExecutionData[], | ||||
| 	response: IN8nHttpFullResponse, | ||||
| ): Promise<INodeExecutionData[]> { | ||||
| 	if (String(response.statusCode).startsWith('4') || String(response.statusCode).startsWith('5')) { | ||||
| 		throw new NodeApiError(this.getNode(), response as unknown as JsonObject); | ||||
| 	} | ||||
| 	return data; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue