Skip to content
Last updated

Invalid Request

The request is malformed and cannot be processed by the server. This typically means the request body, headers, or content type are incorrect.

HTTP Status: 400 Bad Request

Error Codes

CodeDescription
invalid_content_typeThe Content-Type header is missing or not supported
malformed_bodyThe request body is not valid JSON
missing_fileA required file upload is missing

Example Response

{
  "type": "https://api.dinie.com.br/errors/malformed_body",
  "title": "Bad Request",
  "status": 400,
  "detail": "The request body could not be parsed as JSON.",
  "code": "malformed_body"
}

How to Resolve

  • invalid_content_type -- Set the Content-Type header to application/json for JSON requests or multipart/form-data for file uploads.
  • malformed_body -- Validate that your request body is well-formed JSON before sending. Check for trailing commas, unquoted keys, or encoding issues.
  • missing_file -- Ensure the required file field is included in your multipart upload.

See Also