mirror of
https://github.com/coder/coder.git
synced 2025-07-18 13:35:28 +00:00
refactor: replace Code by Detail in the http API error (#1011)
This commit is contained in:
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user