A standard error format, adopted in 2023, and a consumer reading the first element of the errors object rather than looking up a key.
{
"type": "https://docs.example.com/errors/validation",
"title": "Validation failed",
"status": 422,
"errors": {
"email": ["must be a valid address"],
"lines.0.quantity": ["must be at least 1"]
}
}
// the consumer read errors[0], which worked because
// PHP's json_encode preserved insertion order and the
// email rule happened to run first.
An object is unordered by specification and ordered in practice by every implementation, which means a consumer can depend on the order and be right for years. Reordering the validation rules broke them, and the fix on our side was to keep the order stable while they change their parser — which is a promise we should not be making and are, for six weeks.