mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: replace Code by Detail in the http API error (#1011)
This commit is contained in:
+1
-1
@@ -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