Merge pull request from main into feature/expense

This commit is contained in:
2026-06-09 13:21:56 +07:00
parent 29aeb58fc0
commit 664847098e
18 changed files with 344 additions and 61 deletions
+3 -1
View File
@@ -1,6 +1,8 @@
package handler
import (
"apskel-pos-be/internal/logger"
"fmt"
"net/http"
"time"
)
@@ -47,7 +49,7 @@ func (m *CommonMiddleware) Recovery(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
defer func() {
if err := recover(); err != nil {
logger.FromContext(r.Context()).Error("Recovery", fmt.Sprintf("panic recovered: %v", err))
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
}
}()