Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion pages/generative-apis/troubleshooting/fixing-common-issues.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ Below are common issues that you may encounter when using Generative APIs, their
- `15k` tokens context window on `H100` Instances
- `128k` tokens context window on `H100-2` Instances

## 400: Bad Request - Invalid JSON body

### Cause
- 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.

### Solution
- Verify the JSON body you send is valid:
- 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.
- You can copy your content in a JSON formatter tool or linter available online, that will identify errors.
- Usually, most common errors include:
- Missing or unecessary quotes `"`, `'` or commas `,` on properties name and string values.
- Special characters that are not escaped, such as line break `\n` or backslash `\\`

## 403: Forbidden - Insufficient permissions to access the resource

### Cause
Expand Down Expand Up @@ -234,4 +247,4 @@ This snippet will output the model response, which is `4`.
### Debugging silent errors
- For cases where no explicit error is returned:
- Verify all fields in the API request are correctly named and formatted.
- Test the request with smaller and simpler inputs to isolate potential issues.
- Test the request with smaller and simpler inputs to isolate potential issues.