MCPcopy Index your code
hub / github.com/google/go-github / Error

Struct Error

github/github.go:1688–1693  ·  view source on GitHub ↗

* 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:

Source from the content-addressed store, hash-verified

1686GitHub API docs: https://docs.github.com/rest?apiVersion=2022-11-28#client-errors
1687*/
1688type 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
1695func (e *Error) Error() string {
1696 return fmt.Sprintf("%v error caused by %v field on %v resource",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected