- Landing page with hero, feature grid, trust signals - Split-layout login redesign (admin + portal) - Pricing page with storage tiers (5GB/50GB/unlimited) - StorageQuotaService backend (V36 migration, 402 on exceeded) - Frontend storage integration + 402 error handling - StorageController uses TenantContext for tenant isolation - onTierChange() hook for subscription tier updates
This commit is contained in:
@@ -73,7 +73,19 @@ export async function uploadDocument(
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
if (!res.ok) throw new Error("Upload failed")
|
||||
if (!res.ok) {
|
||||
if (res.status === 402) {
|
||||
const problem = await res.json()
|
||||
const error = new Error("Storage quota exceeded") as Error & {
|
||||
status: number
|
||||
problemDetail: unknown
|
||||
}
|
||||
error.status = 402
|
||||
error.problemDetail = problem
|
||||
throw error
|
||||
}
|
||||
throw new Error("Upload failed")
|
||||
}
|
||||
return res.json()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user