Skip to content

Improve error handling in DeckService for missing markdown files (EoP readiness) #2747

@theanand108

Description

@theanand108

While analyzing DeckService and the card loading flow, I noticed that when markdown files such as technical-note.md or explanation.md are missing, the current error handling is quite generic:

console.error(Error reading file at path: ${path}, e);

This makes it difficult to identify which specific card or file caused the issue during debugging.

Since card rendering depends on these files, this becomes especially relevant when working with new or incomplete datasets (e.g., upcoming EoP integration), where missing files may occur during initial setup.

Suggested improvement:
Enhance error messages by including contextual information such as card ID and file type. For example:

  • "Missing technical-note.md for card {cardId}"
  • "Missing explanation.md for card {cardId}"

This would improve traceability and make debugging easier without affecting existing logic.

Happy to implement this if it aligns with the project direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions