A notice about a real change: version 1.0.1 of the KC1 defect prediction API, which I documented (API reference). The API is part of a university project and has no outside users, so nobody received this notice. It's written as I'd send it to developers who integrate it.
The Notice#
To: developers who call POST /predict on the KC1 defect prediction API
Subject: KC1 API 1.0.1: values that aren't finite now get a 422, not a 500
Effective: 2026-11-19, in version 1.0.1
Summary#
POST /predict now refuses a value that isn't a finite number, such as 1e999 or NaN, with 422 Unprocessable Content and a description of the problem. Version 1.0.0 answered the same request with 500 Internal Server Error and no description.
Who Is Affected#
Clients that send a value that isn't finite. A client that sends finite numbers sees no change.
What You Need to Do#
- If your client treats a
500from/predictas a temporary server failure and retries it, check that it doesn't retry a422: the same request will always fail. - Handle
422by readingdetail. A value that isn't finite has the typefinite_number, andlocnames the field. - Check the values before you send them: the API needs 21 finite numbers.
What Changed#
Before, in 1.0.0:
HTTP/1.1 500 Internal Server Error
content-type: text/plain; charset=utf-8
Internal Server Error
After, in 1.0.1:
HTTP/1.1 422 Unprocessable Content
content-type: application/json
{"detail": [{"type": "finite_number", "loc": ["body", "loc"], "msg": "Input should be a finite number", "input": "inf"}]}
Both answers are to the same request, with "loc": 1e999, recorded from each version. Nothing else in the API changed: the other 12 recorded exchanges are the same in both versions.
Updated Documentation#
- API reference: the
422row of the response codes. - Troubleshooting: 422 and "Input should be a finite number".
- The change, and how the documentation followed it: the impact analysis.
Questions#
Open an issue on the KC1 repository, or email me.
Why It’s Written This Way#
- The subject line is the change, so the reader knows from the inbox whether to open it.
- Who is affected comes before what to do, so most readers can stop after two sentences.
- The actions are numbered and start with a verb; the first one is the one that breaks clients: a retry loop on an error that will never succeed.
- The evidence is the real request and the two real responses, not a description of them.
- No marketing, no apology: an engineering change, said plainly.