* An Error reports more details on an individual error in an ErrorResponse. These are the possible validation error codes: missing: resource does not exist missing_field: a required field on a resource has not been set invalid: the formatting of a field is invalid already_exists:
| 1686 | GitHub API docs: https://docs.github.com/rest?apiVersion=2022-11-28#client-errors |
| 1687 | */ |
| 1688 | type Error struct { |
| 1689 | Resource string `json:"resource"` // resource on which the error occurred |
| 1690 | Field string `json:"field"` // field on which the error occurred |
| 1691 | Code string `json:"code"` // validation error code |
| 1692 | Message string `json:"message"` // Message describing the error. Errors with Code == "custom" will always have this set. |
| 1693 | } |
| 1694 | |
| 1695 | func (e *Error) Error() string { |
| 1696 | return fmt.Sprintf("%v error caused by %v field on %v resource", |
nothing calls this directly
no outgoing calls
no test coverage detected