mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	refactor(server): notify url when fetch error
This commit is contained in:
		
							parent
							
								
									d456308653
								
							
						
					
					
						commit
						79212bbd37
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -125,7 +125,7 @@ export class UndiciFetcher {
 | 
			
		|||
				...(options.headers ?? {}),
 | 
			
		||||
			},
 | 
			
		||||
		}).catch((err) => {
 | 
			
		||||
			this.logger?.error('fetch error', err);
 | 
			
		||||
			this.logger?.error(`fetch error to ${typeof url === 'string' ? url : url.href}`, err);
 | 
			
		||||
			throw new StatusError('Resource Unreachable', 500, 'Resource Unreachable');
 | 
			
		||||
		});
 | 
			
		||||
		if (!res.ok && !privateOptions.noOkError) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue