worker/clienterrors: omit details if empty

Omit the details field if it is null/empty.
This commit is contained in:
Gianluca Zuccarelli 2022-04-01 17:15:10 +01:00 committed by Sanne Raymaekers
parent ecc30990c7
commit b1969ba6a6

View file

@ -33,7 +33,7 @@ type ClientErrorCode int
type Error struct {
ID ClientErrorCode `json:"id"`
Reason string `json:"reason"`
Details interface{} `json:"details"`
Details interface{} `json:"details,omitempty"`
}
const (