You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/generative-apis/troubleshooting/fixing-common-issues.mdx
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,19 @@ Below are common issues that you may encounter when using Generative APIs, their
26
26
-`15k` tokens context window on `H100` Instances
27
27
-`128k` tokens context window on `H100-2` Instances
28
28
29
+
## 400: Bad Request - Invalid JSON body
30
+
31
+
### Cause
32
+
- You provided a JSON body that does not follow the [standard JSON structure](https://datatracker.ietf.org/doc/html/rfc8259), therefore your request cannot be analyzed.
33
+
34
+
### Solution
35
+
- Verify the JSON body you send is valid:
36
+
- You can store your content in a file with the `.json` extension (eg. named `file.json`), and open it with an IDE such as VSCode or Zed. Syntax errors should display if there are any.
37
+
- You can copy your content in a JSON formatter tool or linter available online, that will identify errors.
38
+
- Usually, most common errors include:
39
+
- Missing or unecessary quotes `"`, `'` or commas `,` on properties name and string values.
40
+
- Special characters that are not escaped, such as line break `\n` or backslash `\\`
41
+
29
42
## 403: Forbidden - Insufficient permissions to access the resource
30
43
31
44
### Cause
@@ -234,4 +247,4 @@ This snippet will output the model response, which is `4`.
234
247
### Debugging silent errors
235
248
- For cases where no explicit error is returned:
236
249
- Verify all fields in the API request are correctly named and formatted.
237
-
- Test the request with smaller and simpler inputs to isolate potential issues.
250
+
- Test the request with smaller and simpler inputs to isolate potential issues.
0 commit comments