return error in generate response

This commit is contained in:
Michael Yang
2023-07-07 14:04:43 -07:00
parent 2d49197b3b
commit edba935d67
4 changed files with 38 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ func (e Error) Error() string {
if e.Message == "" {
return fmt.Sprintf("%d %v", e.Code, strings.ToLower(http.StatusText(int(e.Code))))
}
return e.Message
}