chore: upgrade to latest OpenAPI (#357)
This commit is contained in:
13
api/error.go
13
api/error.go
@ -13,14 +13,14 @@ type ApiError interface {
|
||||
// Extensions to let our API error types be used as "standard" errors.
|
||||
|
||||
func (o *Error) Error() string {
|
||||
if o.Message != "" && o.Err != nil {
|
||||
if o.Message != nil && o.Err != nil {
|
||||
var b strings.Builder
|
||||
b.WriteString(o.Message)
|
||||
b.WriteString(*o.Message)
|
||||
b.WriteString(": ")
|
||||
b.WriteString(*o.Err)
|
||||
return b.String()
|
||||
} else if o.Message != "" {
|
||||
return o.Message
|
||||
} else if o.Message != nil {
|
||||
return *o.Message
|
||||
} else if o.Err != nil {
|
||||
return *o.Err
|
||||
}
|
||||
@ -55,7 +55,10 @@ func (o *HealthCheck) ErrorCode() ErrorCode {
|
||||
}
|
||||
|
||||
func (o *LineProtocolError) Error() string {
|
||||
return o.Message
|
||||
if o.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *o.Message
|
||||
}
|
||||
|
||||
func (o *LineProtocolError) ErrorCode() ErrorCode {
|
||||
|
Reference in New Issue
Block a user