Проверка и завершение требований уровней «3» и «4»

This commit is contained in:
Grbisba
2026-11-06 13:58:50 +03:00
parent 711754bbcd
commit 08ee3fe0b8
30 changed files with 1752 additions and 92 deletions
@@ -69,6 +69,9 @@ func JSONError(ctx context.Context, w http.ResponseWriter, err error) {
}
w.Header().Set(headers.HeaderRequestID, requestId.String())
if errors.Is(err, context.DeadlineExceeded) {
err = apperr.Wrap(err, apperr.CodeServiceUnavailable, "request deadline exceeded")
}
appErr := apperr.As(err)
if appErr == nil {
appErr = apperr.As(apperr.New(apperr.CodeInternal, "internal server error"))