-
Notifications
You must be signed in to change notification settings - Fork 3
add [properties-be] - properties service handling system #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add [properties-be] - properties service handling system #456
Conversation
- Modified get_entity_type_from_entity_property to exclude system properties by joining property_definitions and filtering on is_system = FALSE - System properties now return 404 Not Found when deletion is attempted - System property values can still be modified via set endpoint - Added documentation explaining this behavior
rust/cloud-storage/properties_service/src/api/properties/definitions/delete.rs
Outdated
Show resolved
Hide resolved
rust/cloud-storage/properties_service/src/api/properties/entities/delete_property.rs
Show resolved
Hide resolved
rust/cloud-storage/properties_service/src/api/properties/options/create.rs
Outdated
Show resolved
Hide resolved
rust/cloud-storage/properties_service/src/api/properties/options/create.rs
Outdated
Show resolved
Hide resolved
rust/cloud-storage/properties_service/src/api/properties/options/create.rs
Outdated
Show resolved
Hide resolved
rust/cloud-storage/properties_service/src/api/properties/options/delete.rs
Outdated
Show resolved
Hide resolved
Fields already captured by #[tracing::instrument] are now removed from individual log statements to avoid duplication in traces.
So system properties like created_at and updated_at can be edited manually by the user? That doesn't make much sense to me. +1 to hutch's concerns about keeping these in sync with the document metadata (and search for that matter). I don't think metadata that exists elsewhere on an item (name, created_at, updated_at) should also be a property for these reasons |
404 responses are normal client errors and don't need to be logged. Simplify ok_or_else closures to plain ok_or calls.
… logging Add err attribute to all #[tracing::instrument] macros to automatically log errors on function return. Remove redundant manual tracing calls before error returns.
Replace 'Database error: {0}' with generic 'An internal error occurred'
to avoid leaking internal database details to API clients. Errors are
still logged server-side via instrument(err).
- Use 'An internal error occurred' for all internal/database errors
- Use '[Entity] not found' pattern for not-found errors (capitalized)
- Use 'Access denied' for permission errors (no details leaked)
- Use '{0}' passthrough for nested errors and validation messages
- Consistent capitalization across all error messages
|
metadata are derived fields (e.g. owner, created_at, updated_at). these are not stored in properties db |
add [properties-be] - properties service handling system
This branch adds support for system properties - properties that are managed by the system rather than users/organizations.
frontend works as is - changes are backwards compatible. but frontend changes to handle system properties incoming as well
