feat: simplify api error message

This commit is contained in:
wpetit 2023-02-27 17:28:55 +01:00
parent dec695f0e2
commit a1f09bafcc
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ type Error struct {
}
func (e *Error) Error() string {
return fmt.Sprintf("%s: %v", e.Code, e.Data)
return fmt.Sprintf("api-error: %s", e.Code)
}
func DataResponse(w http.ResponseWriter, status int, data interface{}) {