fix(BE): kandang capacity and fix err response

This commit is contained in:
Hafizh A. Y
2025-11-14 16:43:01 +07:00
parent 80c84210b8
commit 17d3042586
15 changed files with 129 additions and 84 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ import (
)
func ErrorHandler(c *fiber.Ctx, err error) error {
if errorsMap := validation.CustomErrorMessages(err); len(errorsMap) > 0 {
return response.Error(c, fiber.StatusBadRequest, "Bad Request", errorsMap)
if message, errorsMap := validation.CustomErrorMessages(err); len(errorsMap) > 0 {
return response.Error(c, fiber.StatusBadRequest, message, nil)
}
var fiberErr *fiber.Error