Skip to content

No visible error when creating content not defined in content.config.ts #209

@stijns96

Description

@stijns96

Is your feature request related to a problem? Please describe

I'm trying to create a file that is not defined in my content.config.ts, but don't get any visible error. Looking at the console, I'm getting

host.js?v=16e9f590:145 Uncaught (in promise) Error: Collection not found for fsPath: test.yaml
    at Object.get (host.js?v=16e9f590:145:19)
    at Object.create (host.js?v=16e9f590:173:59)
    at create-document (main.js?v=16e9f590:13127:76)
    at Object.handler (main.js?v=16e9f590:13116:82)
    at Proxy._10 (main.js?v=16e9f590:15860:23)
    at j10 (main.js?v=16e9f590:13790:93)

Describe the solution you'd like

A simple toast mentioning you can't create a file that is not defined in the content.config.ts. Would be good to make this error understandible for editors/clients as well. Maybe it would be even nice if we could override error messages with our own messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions