merge: Bridged error message for when you try search for a post and it fails (!421)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/421 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <marie@kaifa.ch>
This commit is contained in:
		
						commit
						764bbcf05b
					
				
					 1 changed files with 11 additions and 4 deletions
				
			
		| 
						 | 
					@ -109,10 +109,17 @@ export function promiseDialog<T extends Promise<any>>(
 | 
				
			||||||
		if (onFailure) {
 | 
							if (onFailure) {
 | 
				
			||||||
			onFailure(err);
 | 
								onFailure(err);
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			alert({
 | 
								if (err.message) {
 | 
				
			||||||
				type: 'error',
 | 
									alert({
 | 
				
			||||||
				text: err,
 | 
										type: 'error',
 | 
				
			||||||
			});
 | 
										text: err.message,
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									alert({
 | 
				
			||||||
 | 
										type: 'error',
 | 
				
			||||||
 | 
										text: err,
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	});
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue