mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 20:39:00 +08:00
feat(v1): add insufficient credits stuff
This commit is contained in:
parent
fa5544add8
commit
afea2eeaac
@ -50,6 +50,13 @@ function checkCreditsMiddleware(
|
|||||||
if (!success) {
|
if (!success) {
|
||||||
logger.error(
|
logger.error(
|
||||||
`Insufficient credits: ${JSON.stringify({ team_id: req.auth.team_id, minimum, remainingCredits })}`,
|
`Insufficient credits: ${JSON.stringify({ team_id: req.auth.team_id, minimum, remainingCredits })}`,
|
||||||
|
{
|
||||||
|
teamId: req.auth.team_id,
|
||||||
|
minimum,
|
||||||
|
remainingCredits,
|
||||||
|
request: req.body,
|
||||||
|
path: req.path
|
||||||
|
}
|
||||||
);
|
);
|
||||||
if (!res.headersSent) {
|
if (!res.headersSent) {
|
||||||
return res.status(402).json({
|
return res.status(402).json({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user