mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
standardize rate limit return error message
This commit is contained in:
@@ -13,7 +13,7 @@ export async function createRateLimiter(id: string, duration: number, limit: num
|
|||||||
windowMs: duration,
|
windowMs: duration,
|
||||||
max: limit,
|
max: limit,
|
||||||
handler: (req, res) => {
|
handler: (req, res) => {
|
||||||
res.status(429).json({ error: message })
|
res.status(429).send(message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user