Skip to content

Commit b0c0b06

Browse files
committed
changing failure response
1 parent 68f41ce commit b0c0b06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/routes/rateLimitRoute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ router.post('/rate-limits-combo', async (req, res, next) => {
7070
} catch (error) {
7171
if (error.code === '23505') { // Unique violation error code for PostgreSQL
7272
console.warn('Duplicate rate limit combo:', error.detail);
73-
res.status(409).json({ message: 'Combination of ip_address, wallet_address, and github_userid already exists.' });
73+
res.status(204).json({ message: 'Combination of ip_address, wallet_address, and github_userid already exists.' });
7474
} else {
7575
console.error('Error creating rate limit combo:', error);
76-
next(error);
76+
res.status(204).json({ message: 'Error creating rate limit combo.' });
7777
}
7878
}
7979
});

0 commit comments

Comments
 (0)