Discord error 50035: Invalid form body
Last verified against Discord Developer Docs - Opcodes and status codes
Invalid form body (returned for both application/json and multipart/form-data bodies), or invalid Content-Type providedWhat error 50035 means
One or more fields in your request failed validation. This is Discord's general schema-validation error and it is the most informative one in the API, because the response carries a nested errors object that spells out exactly which field was rejected and why. The path to the field is expressed as nested keys, with array indexes as keys (embeds > 0 > description), ending in an _errors array of {code, message} pairs.
Typical inner codes: BASE_TYPE_MAX_LENGTH (content over 2,000, embed description over 4,096, custom_id over 100), BASE_TYPE_REQUIRED (a required field is missing), BASE_TYPE_BAD_LENGTH, NUMBER_TYPE_COERCE (a string where a number was expected, often a snowflake sent as a number), EMBED_FIELDS_MAX (more than 25 fields), APPLICATION_COMMAND_INVALID_NAME (uppercase or spaces in a slash command name), BASE_TYPE_CHOICES (value not in an enum), and EMBED_TOTAL_SIZE (combined embed text over 6,000).
It also fires when the Content-Type header is wrong or missing for the body you sent. If the errors object is absent, suspect the header.
Read the errors object like a file path. errors.embeds.0.description._errors[0] means: the embeds array, index 0, its description field, first violation. Keys mirror your payload exactly, array indexes appear as string keys, and every path terminates in an _errors array of {code, message} pairs. A payload can carry several violations at once, so a short recursive walk beats eyeballing:
function walk(node, path = []) {
if (Array.isArray(node._errors)) {
console.log(path.join('.'), node._errors);
return;
}
for (const key of Object.keys(node)) walk(node[key], path.concat(key));
}
walk(err.rawError.errors); // discord.js DiscordAPIErrordiscord.py flattens the same structure into the exception text (In embeds.0.description: Must be 4096 or fewer in length.), so logging str(error) is usually enough there.
What it looks like
{
"code": 50035,
"errors": {
"embeds": {
"0": {
"description": {
"_errors": [
{
"code": "BASE_TYPE_MAX_LENGTH",
"message": "Must be 4096 or fewer in length."
}
]
}
}
}
},
"message": "Invalid Form Body"
}
// missing field example from the docs:
{
"code": 50035,
"errors": {
"access_token": {
"_errors": [
{ "code": "BASE_TYPE_REQUIRED", "message": "This field is required" }
]
}
},
"message": "Invalid Form Body"
}Why it happens
- Field length over its limit: content 2,000; embed title 256, description 4,096, field value 1,024, footer 2,048; total embed text 6,000; custom_id 100
- Too many items: more than 10 embeds, 25 embed fields, 25 select options, 5 action rows, 25 command options or choices
- Slash command name not matching ^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$ in lowercase (no spaces, no capitals)
- Wrong types: snowflake as number, boolean as string, color as hex string instead of integer
- Invalid or missing Content-Type, or multipart without payload_json
- Unknown or misspelled field names that the endpoint requires
How to fix Discord error 50035
- 1Log the full response body; walk the errors object to the _errors array and read its message
- 2Fix that specific field (truncate, remove extras, correct the type) and resend
- 3Validate lengths and counts locally before sending; most libraries expose builders that throw early
- 4For uploads, send multipart/form-data with a payload_json part and files[n] parts
- 5For command registration, lowercase names and keep descriptions 1-100 characters
How to stop it recurring
Put a validation layer between your feature code and the Discord client that enforces the documented limits (see Discord limits) and truncates or rejects before the request is made. Make sure your error logging prints the errors object, not just message; without it 50035 is a guessing game.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 0: General errorGeneral error (such as a malformed request body, amongst other things)
- 50006: Cannot send an empty messageCannot send an empty message
- 50109: Request body contains invalid JSONThe request body contains invalid JSON.
- 50046: Invalid file uploadedInvalid file uploaded
- 40005: Request entity too largeRequest entity too large. Try sending something smaller in size
Error 50035 - quick answers
What does Discord error 50035 mean?
One or more fields in your request failed validation. This is Discord's general schema-validation error and it is the most informative one in the API, because the response carries a nested errors object that spells out exactly which field was rejected and why.
How do I fix Discord error 50035?
1. Log the full response body; walk the errors object to the _errors array and read its message 2. Fix that specific field (truncate, remove extras, correct the type) and resend 3. Validate lengths and counts locally before sending; most libraries expose builders that throw early 4. For uploads, send multipart/form-data with a payload_json part and files[n] parts 5. For command registration, lowercase names and keep descriptions 1-100 characters
Should I retry after error 50035?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.