Fix autowithdrawal error handling (#1908)
* Fix autowithdrawal error message * Fix no error thrown if autowithdrawal failed
This commit is contained in:
		
							parent
							
								
									f0d7eaf446
								
							
						
					
					
						commit
						fca5193beb
					
				@ -53,7 +53,9 @@ export async function autoWithdraw ({ data: { id }, models, lnd }) {
 | 
			
		||||
        { me: { id }, models, lnd, wallet, logger })
 | 
			
		||||
    } catch (err) {
 | 
			
		||||
      console.error('failed to create autowithdrawal:', err)
 | 
			
		||||
      logger?.error(`incoming payment failed: ${err}`, { bolt11: invoice })
 | 
			
		||||
      logger?.error('incoming payment failed: ' + err.message, { bolt11: invoice })
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  throw new Error('no wallet to receive available')
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user