Skip to content

[Bug]: Silent error when failing to create a new note from a card #1028

@RobTheFiveNine

Description

@RobTheFiveNine

Describe the bug

If a card has text that would exceed the file name length permitted when creating a new note from it, an error is thrown that isn't handled and there is no feedback to the user.

Expected Behavior

An error message should be displayed to the user informing them the card title is too long

Steps to reproduce

  1. Create a new card with the content: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ultrices leo quis est mollis luctus. Maecenas ornare vitae ante euismod interdum. Quisque viverra hendrerit risus in vestibulum. Phasellus luctus rutrum sapien ut malesuada. Vestibulum at condimentum risus. Curabitur hendrerit arcu dolor, rutrum placerat orci vulputate ut. Nulla hendrerit dapibus orci. Ut consectetur neque eget ligula dignissim, eget interdum dui pulvinar. Orci varius natoque penatibus et magnis dis parturient leo.
  2. Open the context menu for the new card and choose to create a new note
  3. Check the console (CTRL + Shift + I) and the unhandled error will be visible

Relevant errors (if available)

plugin:obsidian-kanban:63 Uncaught (in promise) Error: ENAMETOOLONG: name too long, open '/**PATH_TO_VAULT_HERE**/Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ultrices leo quis est mollis luctus. Maecenas ornare vitae ante euismod interdum. Quisque viverra hendrerit risus in vestibulum. Phasellus luctus rutrum sapien ut malesuada. Vestibulum at condimentum risus. Curabitur hendrerit arcu dolor, rutrum placerat orci vulputate ut. Nulla hendrerit dapibus orci. Ut consectetur neque eget ligula dignissim, eget interdum dui pulvinar. Orci varius natoque penatibus et magnis dis parturient leo..md'

Operating system

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions