SIP

Mock 422 Session Interval Too Small Response

The request's Session-Expires value is too small. The Min-SE header in the response indicates the minimum acceptable session interval.

View full reference →

1 HTTP Response

HTTP Response
HTTP/1.1 422 Session Interval Too Small
Content-Type: application/json
Date: Tue, 25 Feb 2026 12:00:00 GMT
Content-Length: 90

{
  "error": "validation_error",
  "errors": [
    {
      "field": "email",
      "message": "Invalid format"
    }
  ]
}

2 Test with curl

terminal
curl -i https://httpbin.org/status/422

3 Return 422 Session Interval Too Small in Your Framework

django
from django.http import JsonResponse


def my_view(request):
    return JsonResponse(
        {"error": "validation_error", "errors": [{"field": "email", "message": "Invalid format"}]},
        status=422,
    )
flask
from flask import Flask, jsonify

app = Flask(__name__)


@app.route("/endpoint")
def my_endpoint():
    return jsonify({"error": "validation_error", "errors": [{"field": "email", "message": "Invalid format"}]}), 422
fastapi
from fastapi import FastAPI
from fastapi.responses import JSONResponse

app = FastAPI()


@app.get("/endpoint")
def my_endpoint():
    return JSONResponse(
        content={"error": "validation_error", "errors": [{"field": "email", "message": "Invalid format"}]},
        status_code=422,
    )
express.js
// Express.js
app.get('/endpoint', (req, res) => {
  res.status(422).json({"error": "validation_error", "errors": [{"field": "email", "message": "Invalid format"}]});
});
spring boot
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;

@RestController
public class MyController {

    @GetMapping("/endpoint")
    public ResponseEntity<Map<String, Object>> myEndpoint() {
        return ResponseEntity
            .status(422)
            .body(Map.of("error", "session_interval_too_small",
                         "message", "Session Interval Too Small"));
    }
}
go net/http
package main

import (
    "encoding/json"
    "net/http"
)

func myHandler(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "application/json")
    w.WriteHeader(422)
    json.NewEncoder(w).Encode(map[string]string{
        "error":   "session_interval_too_small",
        "message": "Session Interval Too Small",
    })
}
ruby on rails
class MyController < ApplicationController
  def my_action
    render json: {"error": "validation_error", "errors": [{"field": "email", "message": "Invalid format"}]},
           status: :session_interval_too_small
  end
end
asp.net core
// ASP.NET Core Minimal API
app.MapGet("/endpoint", () =>
    Results.Json(
        new { error = "session_interval_too_small", message = "Session Interval Too Small" },
        statusCode: 422
    )
);

More SIP Mock Pages