MCPcopy Create free account
hub / github.com/dolanor/rip / Error

Struct Error

error.go:48–72  ·  view source on GitHub ↗

Error is the error returned by rip. It is inspired by JSON-API.

Source from the content-addressed store, hash-verified

46// Error is the error returned by rip.
47// It is inspired by JSON-API.
48type Error struct {
49 // ID is a unique identifier for this particular occurrence of the problem.
50 ID string `json:"id,omitempty"`
51
52 // Links can contains an About Link or a Type Link.
53 Links []ErrorLink `json:"links,omitempty"`
54
55 // Status is the HTTP status code applicable to this problem. This SHOULD be provided.
56 Status int `json:"status,omitempty"`
57
58 // Code is an application-specific error code.
59 Code ErrorCode `json:"code,omitempty"`
60
61 // Title is a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
62 Title string `json:"title,omitempty"`
63
64 // Detail is a human-readable explanation specific to this occurrence of the problem
65 Detail string `json:"detail,omitempty"`
66
67 // Source is an object containing references to the primary source of the error. It SHOULD include one of its member or be omitted.
68 Source ErrorSource `json:"source,omitempty"`
69
70 // Debug contains debug information, not to be read by a user of the app, but by a technical user trying to fix problems.
71 Debug string `json:"debug,omitempty"`
72}
73
74// ErrorSource indicates the source error.
75// It is based on the JSON API specification: https://jsonapi.org/format/#error-objects

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected