Skip to content

MissingSchemaError instead of 404 #19

@iliakan

Description

@iliakan

Hi,

I tried mers in my project: app.use('/rest', mers({..}).rest())

...But when I visit /rest/none where none is an unknown schema, I get error:

   500 MissingSchemaError: Schema hasn't been registered for model "undefined". Use mongoose.model(name, schema)

It's strange to see 500 here, because "non-existant" has the code of 404.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions