forked from open-webui/open-webui
		
	Add error catching for import
This commit is contained in:
		
							parent
							
								
									27d5eb4684
								
							
						
					
					
						commit
						415777eca2
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -133,7 +133,11 @@ | ||||||
| 			let chats = JSON.parse(event.target.result); | 			let chats = JSON.parse(event.target.result); | ||||||
| 			console.log(chats); | 			console.log(chats); | ||||||
| 			if (getImportOrigin(chats) == 'gpt') { | 			if (getImportOrigin(chats) == 'gpt') { | ||||||
|  | 				try { | ||||||
| 					chats = convertGptChats(chats); | 					chats = convertGptChats(chats); | ||||||
|  | 				} catch (error) { | ||||||
|  | 					console.log("Unable to import chats:", error); | ||||||
|  | 				} | ||||||
| 			} | 			} | ||||||
| 			importChats(chats); | 			importChats(chats); | ||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brandon Hulston
						Brandon Hulston