# Error Codes Reference ## 🔹 Summary Table | Code | Message | Description | | ---- | ----------------------------------------------------- | ------------------------------------------ | | 400 | Text must contain at least two words | Input text too short | | 400 | Text should be less than 10,000 characters | Input text too long | | 404 | The file is empty or only contains whitespace | File has no usable content | | 404 | Invalid file type. Only .docx, .pdf, and .txt allowed | Unsupported file format | | 403 | Invalid or expired token | Authentication token is invalid or expired | | 413 | Text must contain at least two words | Text too short (alternative condition) | | 413 | Text must be less than 10,000 characters | Text too long (alternative condition) | | 413 | The image error (preprocessing) | Image size/content issue | | 500 | Error processing the file | Internal server error while processing | --- ## 🔍 Error Details ### `400` - Bad Request - **Text must contain at least two words** The input text field is too short. Submit at least two words to proceed. - **Text should be less than 10,000 characters** Input text exceeds the maximum allowed character limit. Consider truncating or summarizing the content. --- ### `404` - Not Found - **The file is empty or only contains whitespace** The uploaded file is invalid due to lack of meaningful content. Ensure the file has readable, non-empty text. - **Invalid file type. Only .docx, .pdf, and .txt are allowed** The file format is not supported. Convert the file to one of the allowed formats before uploading. --- ### `403` - Forbidden - **Invalid or expired token** Your access token is either expired or incorrect. Try logging in again or refreshing the token. --- ### `413` - Payload Too Large - **Text must contain at least two words** The text payload is too small or malformed under a large upload context. Add more content. - **Text must be less than 10,000 characters** The payload exceeds the allowed character limit for a single request. Break it into smaller chunks if needed. - **The image error** The uploaded image is too large or corrupted. Try resizing or compressing it before retrying. --- ### `500` - Internal Server Error - **Error processing the file** An unexpected server-side failure occurred during file analysis. Retry later or contact support if persistent. --- > 📌 **Note:** Always validate inputs, check token status, and follow file guidelines before making requests.