auto(agent): Improved error handling in addresses route
This commit is contained in:
parent
c2dd24f1b3
commit
2d24125498
1 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ router.post('/change-request', requireAuth, async (req, res) => {
|
|||
});
|
||||
} catch (err) {
|
||||
console.error('Error in address change request:', err);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
return res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ router.post('/verify', requireAuth, async (req, res) => {
|
|||
res.json({ status: 'verified' });
|
||||
} catch (err) {
|
||||
console.error('Error in address verification:', err);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
return res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue