DNS

Mock 17 BADKEY Response

Key not recognized. The TSIG key name in the message is not configured on the server.

View full reference →

1 HTTP Response

HTTP Response
HTTP/1.1 17 BADKEY
Content-Type: application/json
Date: Tue, 25 Feb 2026 12:00:00 GMT

2 Test with curl

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

3 Return 17 BADKEY in Your Framework

django
from django.http import HttpResponse


def my_view(request):
    return HttpResponse(status=17)  # BADKEY
flask
from flask import Flask

app = Flask(__name__)


@app.route("/endpoint")
def my_endpoint():
    return "", 17  # BADKEY
fastapi
from fastapi import FastAPI
from fastapi.responses import Response

app = FastAPI()


@app.get("/endpoint")
def my_endpoint():
    return Response(status_code=17)  # BADKEY
express.js
// Express.js
app.get('/endpoint', (req, res) => {
  res.sendStatus(17); // BADKEY
});
spring boot
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
public class MyController {

    @GetMapping("/endpoint")
    public ResponseEntity<Void> myEndpoint() {
        return ResponseEntity
            .status(17) // BADKEY
            .build();
    }
}
go net/http
package main

import "net/http"

func myHandler(w http.ResponseWriter, r *http.Request) {
    w.WriteHeader(17) // BADKEY
}
ruby on rails
class MyController < ApplicationController
  def my_action
    head :badkey
  end
end
asp.net core
// ASP.NET Core Minimal API
app.MapGet("/endpoint", () =>
    Results.StatusCode(17) // BADKEY
);

More DNS Mock Pages