RuleViolation

One business rule broken by the diagram. The same shape is used wherever violations are reported: inside a draft, and in a 422 when an operation requires a valid diagram.

  • The rule that was broken, and the thing here safe to branch on.

    When a call fails lists every code, says which are refused on the spot and which are stored with the draft, and what each one is about. A code you get that is not on that list came from a bot an older builder wrote.

  • Human-readable description of what is wrong. One sentence, and it names neither what was sent nor what would have been accepted: code is what identifies the rule, param and block_id what it is about, and GET /blocks what each rule accepts.

  • The block that breaks the rule, for a rule about one block. Inside a draft it comes as null when there is none; inside a 422 it is omitted instead.

  • The connections the rule concerns, for rules about wiring — for instance connection_output_removed, where these are the connections left without an output. Empty for every other rule.

    Properties: 2
  • The param the rule applies to, for a rule about one param. Same as block_id: null inside a draft, omitted inside a 422.