refactor: replace Code by Detail in the http API error (#1011)

This commit is contained in:
Bruno Quaresma
2022-04-18 11:02:54 -05:00
committed by GitHub
parent 9faa39aa23
commit 3311c2f65d
6 changed files with 18 additions and 18 deletions

View File

@ -127,7 +127,7 @@ func (e *Error) Error() string {
var builder strings.Builder
_, _ = fmt.Fprintf(&builder, "status code %d: %s", e.statusCode, e.Message)
for _, err := range e.Errors {
_, _ = fmt.Fprintf(&builder, "\n\t%s: %s", err.Field, err.Code)
_, _ = fmt.Fprintf(&builder, "\n\t%s: %s", err.Field, err.Detail)
}
return builder.String()
}