()
| 33 | } |
| 34 | |
| 35 | func (e *OptionNotFoundError) Error() string { |
| 36 | if len(e.Candidates) == 0 { |
| 37 | return fmt.Sprintf("option %q not found on field %q; the field has no options", e.Name, e.FieldName) |
| 38 | } |
| 39 | return fmt.Sprintf("option %q not found on field %q; available options: %s", e.Name, e.FieldName, strings.Join(e.Candidates, ", ")) |
| 40 | } |
| 41 | |
| 42 | // OptionAmbiguousError is returned when more than one single-select option |
| 43 | // shares the given name. Candidates lists the option IDs of the matches. |