Files
threshold/api/error.gen.go
T
Todd Knight aa4157639c Change Format of API Error (#784)
This is a wire breaking change for json errors since we have removed and renamed a few fields, and changed part of the structure of the returned json error.

* Remove redundant fields in Status, details.error_id, details.TraceId and details.request_id from API errors.

* Added wrapped errors and "ops" field to indicate the internal operation of the errors returned by the API.

* Added error cli error reporting of Op and wrapped errors.
2020-12-07 14:25:16 -07:00

26 lines
549 B
Go

// Code generated by "make api"; DO NOT EDIT.
package api
import "bytes"
type Error struct {
Kind string `json:"kind,omitempty"`
Op string `json:"op,omitempty"`
Message string `json:"message,omitempty"`
Details *ErrorDetails `json:"details,omitempty"`
response *Response
}
func (n Error) ResponseBody() *bytes.Buffer {
return n.response.Body
}
func (n Error) ResponseMap() map[string]interface{} {
return n.response.Map
}
func (n Error) ResponseStatus() int {
return n.response.HttpResponse().StatusCode
}