Skip to content

fix: handle missing content directories gracefully #11

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

Merged
merged 2 commits into from
Aug 6, 2025

Conversation

DominusKelvin
Copy link
Member

Resolves #10

  • Add ENOENT error handling in find, findOne, and count methods
  • Return empty results instead of crashing when directories don't exist
  • Add defensive programming for query.criteria.select when undefined
  • Properly handle omit fields when select criteria is not provided

This allows applications to start successfully even when content directories haven't been created yet, and prevents crashes from Sails archive system when archiveModelIdentity is not properly configured.

Closes #10

- Add ENOENT error handling in find, findOne, and count methods
- Return empty results instead of crashing when directories don't exist
- Add defensive programming for query.criteria.select when undefined
- Properly handle omit fields when select criteria is not provided

This allows applications to start successfully even when content directories
haven't been created yet, and prevents crashes from Sails archive system
when archiveModelIdentity is not properly configured.

Closes #10
@DominusKelvin DominusKelvin merged commit 19bae73 into develop Aug 6, 2025
2 checks passed
@DominusKelvin DominusKelvin deleted the feat/handle-missing-directories branch August 6, 2025 14:32
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.

Handle missing content directories gracefully in sails-content adapter
1 participant