mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	making sure that if AJAX request fails, then the whole operation is cancelled (previously the promise has been resolved successfully even in case of failed request)
This commit is contained in:
		
							parent
							
								
									dc714f20c5
								
							
						
					
					
						commit
						35912f325b
					
				| @ -82,6 +82,8 @@ const server = (function() { | |||||||
| 
 | 
 | ||||||
|         return await $.ajax(options).catch(e => { |         return await $.ajax(options).catch(e => { | ||||||
|             showError("Error when calling " + method + " " + url + ": " + e.status + " - " + e.statusText); |             showError("Error when calling " + method + " " + url + ": " + e.status + " - " + e.statusText); | ||||||
|  | 
 | ||||||
|  |             throw e; | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner