-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Error messages throughout the codebase are inconsistent. Some are user-friendly, others expose internal details that users don't need to see.
Examples
Good - User-friendly:
return asErrorResult('Directory argument is required and must be a string path');Inconsistent - Internal details:
return asErrorResult(\`API call failed: \${error.message || String(error)}. Check server logs for details.\`);Proposed Standards
-
User-facing errors should:
- Be actionable (tell user what to fix)
- Not expose internal stack traces
- Use consistent format
-
Internal errors should:
- Log full details to console
- Return simplified message to user
- Include error codes for debugging
Example Pattern
try {
// operation
} catch (error) {
console.error('[ERROR] Internal details:', error);
return asErrorResult('Failed to process request. Please check your inputs.');
}Files Affected
src/tools/create-supermodel-graph.ts- Query handlers in
src/queries/ - Utility functions in
src/utils/
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request