diff --git a/front/pages/api/v1/w/[wId]/data_sources/[name]/documents/[documentId]/index.ts b/front/pages/api/v1/w/[wId]/data_sources/[name]/documents/[documentId]/index.ts index 080444747fda..cdd4ab9e4938 100644 --- a/front/pages/api/v1/w/[wId]/data_sources/[name]/documents/[documentId]/index.ts +++ b/front/pages/api/v1/w/[wId]/data_sources/[name]/documents/[documentId]/index.ts @@ -222,7 +222,8 @@ async function handler( api_error: { type: "data_source_quota_error", message: - "Data sources are limited to 32 documents on our free plan. Contact team@dust.tt if you want to increase this limit.", + `Data sources are limited to ${plan.limits.dataSources.documents.count} ` + + `documents on your current plan. Contact team@dust.tt if you want to increase this limit.`, }, }); } @@ -238,7 +239,10 @@ async function handler( api_error: { type: "data_source_quota_error", message: - "Data sources document upload size is limited to 1MB. Contact team@dust.tt if you want to increase it.", + `Data sources document upload size is limited to ` + + `${plan.limits.dataSources.documents.sizeMb}MB on your current plan. ` + + `You are attempting to upload ${fullText.length} bytes. ` + + `Contact team@dust.tt if you want to increase it.`, }, }); } diff --git a/front/pages/api/w/[wId]/data_sources/[name]/documents/[documentId]/index.ts b/front/pages/api/w/[wId]/data_sources/[name]/documents/[documentId]/index.ts index 0889659b0424..3a9a601a15e4 100644 --- a/front/pages/api/w/[wId]/data_sources/[name]/documents/[documentId]/index.ts +++ b/front/pages/api/w/[wId]/data_sources/[name]/documents/[documentId]/index.ts @@ -164,7 +164,8 @@ async function handler( api_error: { type: "data_source_quota_error", message: - "Data sources are limited to 32 documents on our free plan. Contact team@dust.tt if you want to increase this limit.", + `Data sources are limited to ${plan.limits.dataSources.documents.count} ` + + `documents on your current plan. Contact team@dust.tt if you want to increase this limit.`, }, }); } @@ -180,7 +181,10 @@ async function handler( api_error: { type: "data_source_quota_error", message: - "Data sources document upload size is limited to 1MB. Contact team@dust.tt if you want to increase it.", + `Data sources document upload size is limited to ` + + `${plan.limits.dataSources.documents.sizeMb}MB on your current plan. ` + + `You are attempting to upload ${fullText.length} bytes. ` + + `Contact team@dust.tt if you want to increase it.`, }, }); }