Skip to content

Commit

Permalink
refactor: error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce McMath <[email protected]>
  • Loading branch information
bryce-mcmath committed Jan 25, 2025
1 parent 61b34df commit ea013c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/hooks/initialize-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const useInitializeBCAgent = () => {
} catch {
// if the existing agents wallet cannot be opened or initialize() fails it was
// again not a clean shutdown and the agent should be replaced, not restarted
logger.warn('Failed to restart existing agent, skipping agent restart')
logger.error('Failed to restart existing agent, skipping agent restart')
return
}

Expand Down Expand Up @@ -210,7 +210,7 @@ const useInitializeBCAgent = () => {
const newAgent = await createNewAgent(ledgers)
if (!newAgent) {
logger.error('Failed to create a new agent')
return
throw new Error('Failed to create a a new agent')
}

logger.info('Migrating agent if required...')
Expand Down

0 comments on commit ea013c9

Please sign in to comment.