docs: record remote preview acceptance and verify example error logging

This commit is contained in:
2026-09-23 17:37:53 +08:00
parent 0ce3efb6fc
commit ab8eac5fc4
5 changed files with 214 additions and 4 deletions

View File

@@ -44,7 +44,9 @@ func (s *Service) failure(ctx context.Context, err error) error {
default:
// Do not log SQL/DSN or user input; requestId correlates the failed operation.
s.deps.Logger.ErrorContext(ctx, "user.operationFailed", "category", "persistence")
return apierrors.Internal(err)
// HTTP access logging also sees the returned error. Keep raw driver
// errors out of that path because their messages may contain input.
return apierrors.New(500, "INTERNAL_ERROR", "internal server error")
}
}
func (s *Service) mutate(ctx context.Context, operation string, fn func(repo.UserRepository) (model.User, error)) (*types.UserResp, error) {