()
| 37 | } |
| 38 | |
| 39 | func (e *FieldNotFoundError) Error() string { |
| 40 | if len(e.Candidates) == 0 { |
| 41 | return fmt.Sprintf("field %q not found in project; the project has no fields", e.Name) |
| 42 | } |
| 43 | return fmt.Sprintf("field %q not found in project; available fields: %s", e.Name, strings.Join(e.Candidates, ", ")) |
| 44 | } |
| 45 | |
| 46 | // FieldAmbiguousError is returned when more than one field shares the given |
| 47 | // name. Candidates lists the node IDs of the matching fields. |