---
title: "Responds with the HTTP status code specified in the path."
url: "https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8/operations/status_handler"
---

> Full API specification: https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8.md

# Responds with the HTTP status code specified in the path.

`HEAD` `/status/{code}`

Operation ID: `status_handler`

This handler allows testing of how a client handles different HTTP status codes. It accepts any HTTP method. # Path Parameters: - `code`: The HTTP status code to return (e.g., 200, 404, 500). # Responses: - Returns the status code specified by the `code` path parameter. - If an invalid `code` is provided (e.g., not a number or out of valid range), it defaults to `400 Bad Request`.

## Path parameters

- `code` (integer, int32, required) - HTTP status code to return

## Responses

- `200` - Returns the specified status code
- `400` - Invalid status code provided

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: rucho
  version: 1.6.0
servers:
  - url: https://rucho.org
    description: Production (EKS us-east-2, behind Kong)
paths:
  /status/{code}:
    head:
      tags:
        - crate::routes::core_routes
      summary: Responds with the HTTP status code specified in the path.
      description: >-
        This handler allows testing of how a client handles different HTTP
        status codes.

        It accepts any HTTP method.


        # Path Parameters:

        - `code`: The HTTP status code to return (e.g., 200, 404, 500).


        # Responses:

        - Returns the status code specified by the `code` path parameter.

        - If an invalid `code` is provided (e.g., not a number or out of valid
        range),

        it defaults to `400 Bad Request`.
      operationId: status_handler
      parameters:
        - name: code
          in: path
          description: HTTP status code to return
          required: true
          schema:
            type: integer
            format: int32
            minimum: 0
      responses:
        "200":
          description: Returns the specified status code
        "400":
          description: Invalid status code provided
```
