Skip to content

Commit 2a08897

Browse files
committed
fix: status code in quotaUsage
1 parent bee8ce8 commit 2a08897

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/server/src/utils/quotaUsage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const checkUsageLimit = async (
7070
if (limit === -1) return
7171

7272
if (currentUsage > limit) {
73-
throw new InternalFlowiseError(StatusCodes.TOO_MANY_REQUESTS, `Limit exceeded: ${type}`)
73+
throw new InternalFlowiseError(StatusCodes.PAYMENT_REQUIRED, `Limit exceeded: ${type}`)
7474
}
7575
}
7676

@@ -135,7 +135,7 @@ export const checkPredictions = async (orgId: string, subscriptionId: string, us
135135
if (predictionsLimit === -1) return
136136

137137
if (currentPredictions >= predictionsLimit) {
138-
throw new InternalFlowiseError(StatusCodes.TOO_MANY_REQUESTS, 'Predictions limit exceeded')
138+
throw new InternalFlowiseError(StatusCodes.PAYMENT_REQUIRED, 'Predictions limit exceeded')
139139
}
140140

141141
return {
@@ -161,7 +161,7 @@ export const checkStorage = async (orgId: string, subscriptionId: string, usageC
161161
if (storageLimit === -1) return
162162

163163
if (currentStorageUsage >= storageLimit) {
164-
throw new InternalFlowiseError(StatusCodes.TOO_MANY_REQUESTS, 'Storage limit exceeded')
164+
throw new InternalFlowiseError(StatusCodes.PAYMENT_REQUIRED, 'Storage limit exceeded')
165165
}
166166

167167
return {

0 commit comments

Comments
 (0)