Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update error truncate size (#10902)

Danny Xu9b2d9a7bbc9d
diff --git a/backend/api/v1/debug_interceptor.go b/backend/api/v1/debug_interceptor.go
index 587bdf6d0a..8edb9a77c3 100644
--- a/backend/api/v1/debug_interceptor.go
+++ b/backend/api/v1/debug_interceptor.go
@@ -41,9 +41,9 @@ func (in *DebugInterceptor) DebugInterceptor(ctx context.Context, request any, s
resp, err := handler(ctx, request)
in.debugInterceptorDo(ctx, serverInfo.FullMethod, err, startTime)
- // Truncate error message to 1024 characters.
+ // Truncate error message to 10240 characters.
st, _ := status.FromError(err)
- if msg, truncated := common.TruncateString(st.Message(), 1024); truncated {
+ if msg, truncated := common.TruncateString(st.Message(), 10240); truncated {
slog.Info("Truncated error message", slog.String("fullMethod", serverInfo.FullMethod), slog.String("original error message", st.Message()))
stp := st.Proto()
stp.Message = "[TRUNCATED] " + msg