Skip to content

Conversation

@gabsow
Copy link
Collaborator

@gabsow gabsow commented Dec 28, 2025

  • path info

  • value types

  • query compilation error

  • query compilation error

  • cleaning up

  • stop using Error when we have RedisError


Note

Unifies error handling and sanitizes error output while modernizing deps.

  • Remove redis_json/src/error.rs; switch all command/manager/key code to RedisError/RedisResult and simplify signatures
  • Standardize helpers err_invalid_path, err_invalid_path_or, err_json; scrub detailed path/type from messages; update tests to match
  • Map QueryCompilationError to RedisError and refine compilation error text in json_path; minor wording fixes
  • Add redis-module to json_path; bump redismodule-rs to v2.1.3 via workspace and use workspace deps in redis_json
  • Minor refactors (function visibility, iter/collect cleanups, default path handling for JSON.CLEAR)

Written by Cursor Bugbot for commit 03b166f. This will update automatically on new commits. Configure here.

* path info

* value types

* query compilation error

* query compilation error

* cleaning up

* stop using Error when we have RedisError
@gabsow gabsow merged commit 0940966 into 8.4 Dec 28, 2025
19 checks passed
@gabsow gabsow deleted the MOD-13193 branch December 28, 2025 12:40
message: final_msg,
})
let message = format!("Error at position {}: {}", location, msg);
Err(QueryCompilationError { location, message })
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate position info in compilation error messages

The error message field is now constructed with "Error at position {}: {}" format, but the Display implementation for QueryCompilationError also prefixes the message with "Error occurred at position {}, {}". When to_string() is called (via the From<QueryCompilationError> for RedisError implementation), the resulting error message will contain duplicate position information, such as: "Error occurred at position 5, Error at position 5: expected one of...". The message field should contain only the parsing error details without the position prefix.

Additional Locations (1)

Fix in Cursor Fix in Web

@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

❌ Patch coverage is 91.42857% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.97%. Comparing base (7d00e74) to head (03b166f).
⚠️ Report is 12 commits behind head on 8.4.

Files with missing lines Patch % Lines
json_path/src/json_path.rs 71.42% 6 Missing ⚠️
redis_json/src/ivalue_manager.rs 78.26% 5 Missing ⚠️
redis_json/src/backward.rs 25.00% 3 Missing ⚠️
redis_json/src/key_value.rs 96.55% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #1480      +/-   ##
==========================================
- Coverage   77.56%   76.97%   -0.60%     
==========================================
  Files          16       15       -1     
  Lines        3945     3756     -189     
==========================================
- Hits         3060     2891     -169     
+ Misses        885      865      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

gabsow added a commit that referenced this pull request Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants