fix: increase reformulate word limit to 2000 + i18n error messages
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 4s
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 4s
- Raise MAX_WORDS from 500 to 2000 for text reformulation - Error messages now use i18n keys (ai.wordCountMin/Max) instead of hardcoded English strings - Client translates server errors using the user's UI language Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,11 @@ export async function POST(request: NextRequest) {
|
||||
// Validate word count
|
||||
const validation = paragraphRefactorService.validateWordCount(text)
|
||||
if (!validation.valid) {
|
||||
return NextResponse.json({ error: validation.error }, { status: 400 })
|
||||
return NextResponse.json({
|
||||
error: validation.error,
|
||||
errorKey: validation.errorKey,
|
||||
params: validation.params,
|
||||
}, { status: 400 })
|
||||
}
|
||||
|
||||
// Use the ParagraphRefactorService
|
||||
|
||||
Reference in New Issue
Block a user