MissingSchemaError instead of 404 #19

Open
iliakan opened this Issue Oct 29, 2013 · 3 comments

Comments

Projects
None yet
2 participants

iliakan commented Oct 29, 2013

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.

Owner

jspears commented Oct 29, 2013

Good point will review error codes

Sent from my iPhone

On Oct 29, 2013, at 8:42 AM, iliakan notifications@github.com 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
.

iliakan commented Oct 29, 2013

The execution gets to the point where it shouldn't get imo.

Owner

jspears commented Oct 29, 2013

Patches welcomed.

Sent from my iPhone

On Oct 29, 2013, at 9:37 AM, iliakan notifications@github.com 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
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment