Skip to content

OPEN-50

Codes the specification defines are UPPER_SNAKE_CASE; the lower-case ones change case.

What was open

No convention said how a machine-readable code is spelled. INT-16 and the validation codes used upper case (INWARD_SIGNAL_ALREADY_PENDING, R4_NAME_FORMAT), while RT-GATE-4 used confirmation_declined and CRON-2 used no_expression, invalid_expression and invalid_timezone. Codes are compared as strings, so a client or a test had to know each code's case one by one, and an implementation adding a code had no form to follow.

Decision

The conventions now state that every code this specification defines (a refusal's error_code, a validation error's code, an error output's code, a diagnostic code in a report, and every value of a reason vocabulary such as a skip reason) is UPPER_SNAKE_CASE, that a code an implementation or a node type adds should take the same form, and that a defined code is never emitted in another case. RT-GATE-4's decline code becomes CONFIRMATION_DECLINED, and CRON-2's codes become NO_EXPRESSION, INVALID_EXPRESSION and INVALID_TIMEZONE. Reasons are codes too: BR-7's skip reason becomes BRANCH_NOT_ACTIVE (SG-21 names it beside its own SUPERSEDED_ROUND), EDGE-7's exclusion reason TOOL_ONLY, and RT-GATE-1's decline reason for an expired gate EXPIRED. Their meaning is unchanged; API-8's rule that a published code keeps its meaning is about meaning, and a client compares codes as strings, so the new spellings are new codes that carry the old meanings. Upper case was chosen because most codes in the specification already used it.

Rules affected