Skip to content

Bad Request

URI: https://docs.ankatech.co/errors/bad-request
HTTP Status: 400 Bad Request

When you see this

A request parameter fell outside the range or the allow-list the endpoint accepts, and the Admin API refused it before doing any work. This type is the generic Admin API 400: it is emitted by the handler that maps a Spring ResponseStatusException to its embedded status, so the type suffix is the status name rather than a named domain condition. The detail member names the parameter and the accepted values.

It is not the validation failure that a request body produces — a rejected body is Validation Error, and a malformed value is Invalid Input. This one is a query-parameter refusal on a collection read.

Common Causes

  • size outside 1..50 on GET /api/v3/admin/exchanges.
  • sortBy naming a field that is not on that endpoint's sort allow-list. The allow-list exists so a caller cannot sort by an arbitrary column, so an unrecognised value is refused rather than ignored.

Response Example

{
  "type": "https://docs.ankatech.co/errors/bad-request",
  "title": "Bad Request",
  "status": 400,
  "detail": "size must be between 1 and 50",
  "instance": "/api/v3/admin/exchanges",
  "timestamp": 1730000000,
  "extensions": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Content-Type: application/problem+json — the response follows RFC 9457 Problem Details. This is an Admin API body, so the correlation identifier is extensions.requestId; see Error Index & Overview.

How to Resolve

  1. Read detail — it names the parameter and the accepted range or set.
  2. Correct the query parameter and re-send. Nothing was changed, so there is no partial result to clean up.
  3. When paging, request a page size inside the endpoint's bound rather than asking for the whole collection in one call.

For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.