File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,3 +8,11 @@ package apitypes
88
99// Port is the listening port of the HTTP API server.
1010const Port = "1314"
11+
12+ // APIError is the body returned by the Contrast HTTP API if a request was not successful.
13+ type APIError struct {
14+ // Version is the Coordinator version.
15+ Version string `json:"version"`
16+ StatusCode int `json:"status_code"`
17+ Err string `json:"error"`
18+ }
Original file line number Diff line number Diff line change @@ -22,11 +22,9 @@ type AttestationRequest struct {
2222}
2323
2424// AttestationError is returned by the /attest endpoint if the request was not successful.
25- type AttestationError struct {
26- // Version is the Coordinator version.
27- Version string `json:"version"`
28- Err string `json:"error"`
29- }
25+ //
26+ // It is an alias of [APIError], which all Contrast HTTP API endpoints return on error.
27+ type AttestationError = APIError
3028
3129// AttestationResponse contains all fields required for application-level verification.
3230type AttestationResponse struct {
You can’t perform that action at this time.
0 commit comments