MissingSchemaError instead of 404
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.
Good point will review error codes
Sent from my iPhone
On Oct 29, 2013, at 8:42 AM, iliakan [email protected] wrote:
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.
— Reply to this email directly or view it on GitHubhttps://github.com/jspears/mers/issues/19 .
The execution gets to the point where it shouldn't get imo.
Patches welcomed.
Sent from my iPhone
On Oct 29, 2013, at 9:37 AM, iliakan [email protected] wrote:
The execution gets to the point where it shouldn't get imo.
— Reply to this email directly or view it on GitHubhttps://github.com/jspears/mers/issues/19#issuecomment-27302900 .