Skip to content
Settings

MALFORMED_REQUEST — grouped-stats request body could not be decoded

cyoda-go version 0.8.4

MALFORMED_REQUEST — the grouped-statistics request body could not be read or decoded.

HTTP: 400 Bad Request. Retryable: no.

Raised by POST /api/entity/stats/{entityName}/{modelVersion}/query when the body cannot be read from the connection, is not valid JSON, or does not decode into the request shape. Decoding is strict: an unrecognised top-level field is rejected rather than ignored, so a misspelled agregations fails here instead of quietly running with no aggregations. A pointInTime that is not RFC 3339 also lands here, because it is rejected while the body is being decoded — there is no separate code for it.

The message carries the decoder’s reason. Correct the body and resend.

A body over the 10 MiB ceiling is a different outcome: 413 with BAD_REQUEST. Field-level problems that survive decoding — an empty groupBy, a bad JSONPath, an unknown aggregation operator — have their own codes.

Other entity endpoints report an undecodable body as BAD_REQUEST; this code is specific to the grouped-statistics endpoint.

  • errors
  • crud
  • errors.BAD_REQUEST
  • cyoda help errors — Every error response from the Cyoda REST API carries a structured errorCode in the properties object. Multiple codes may share the same HTTP status. Programmatic handling keys on errorCode, not HTTP status.
  • cyoda help crud — Entities are instances of models. Each entity has a UUID, a model reference (entityName, modelVersion), and a lifecycle state managed by the workflow engine. Creating an entity requires the referenced model to be in LOCKED state. All write operations run within a Cyoda transaction and return a transactionId alongside the affected entity IDs.
  • cyoda help errors BAD_REQUEST — Fired when the server cannot parse or structurally process the incoming request. Common triggers include invalid JSON, unsupported format specifiers, a parameter outside its allowed range, and mutually exclusive parameters set together.