File size: 2,877 Bytes
b8aa51a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 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.