banatie-service/apps/api-service/_tests/todo.md

40 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 6. ERROR HANDLING ENDPOINTS (4/4) ✅
# Test Case Expected Actual Status
15 No API Key 401 ❌ 200 с error ⚠️ Не правильный статус
16 Invalid API Key 401 ❌ 200 с error ⚠️ Не правильный статус
17 Missing Prompt 400 ❌ 200 с error ⚠️ Не правильный статус
19 Wrong Key Type 403 ❌ 200 с error ⚠️ Не правильный статус
Детали:
✅ Error messages корректные
⚠️ HTTP status codes всегда 200 (должны быть 401, 400, 403)
Примеры ответов:
// Test 15 - No API Key
{
"error": "Missing API key",
"message": "Provide your API key via X-API-Key header"
}
// Test 16 - Invalid Key
{
"error": "Invalid API key",
"message": "The provided API key is invalid, expired, or revoked"
}
// Test 17 - Missing Prompt
{
"success": false,
"error": "Validation failed",
"message": "Prompt is required"
}
// Test 19 - Wrong Key Type
{
"error": "Master key required",
"message": "This endpoint requires a master API key"
}
## Docs
Endpoint /api/images не существует
В документации упоминается /api/images
Реально работает только /api/images/generated
Нужно: Обновить документацию или добавить endpoint