a typical 404 error (not finding the template) results in an error
like this
Error: require error: couldn't find "..."
but in dispatcher.js, there a in my opinion wrong RegExp:
if (/^require error/.test(e.toString())) // FIXME: a better test
needed here!
return {status: 404, headers: {}, body: ["Action not found",
e.toString()]};
else
throw e;
I changed the RegExp in my app to: (/^Error: require
error/.test(e.toString())), and it seems to work propperly.
is there currently a way to differentiate between errorpages based on
status codes ? A error.html seems to catch all.
so I guess the way to go is to use a custom error wrapper instead of
nitro/Error
--
Roberto
I changed the RegExp in my app to: (/^Error: require
error/.test(e.toString())), and it seems to work propperly.
--
You received this message because you are subscribed to the Google Groups "nitro-devel" group.
To post to this group, send email to nitro...@googlegroups.com.
To unsubscribe from this group, send email to nitro-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nitro-devel?hl=en.
--
You received this message because you are subscribed to the Google Groups "nitro-devel" group.
To post to this group, send email to nitro...@googlegroups.com.
To unsubscribe from this group, send email to nitro-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nitro-devel?hl=en.
On Mar 6, 4:18 am, George Moschovitis <george-moschovi...@gmosx.com>
wrote:
> > I changed the RegExp in my app to: (/^Error: require
> > error/.test(e.toString())), and it seems to work propperly.
>
> can you send a pull request?
>
> thanks,
> -g.
>
>
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nitro-devel" group.
> > To post to this group, send email to nitro...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > nitro-devel...@googlegroups.com<nitro-devel%2Bunsubscribe@googlegr oups.com>
On Mar 6, 4:19 am, George Moschovitis <george-moschovi...@gmosx.com>
wrote:
> > nitro-devel...@googlegroups.com<nitro-devel%2Bunsubscribe@googlegr oups.com>
To unsubscribe from this group, send email to nitro-devel...@googlegroups.com.
Perhaps we need better default paths, perhaps:
4xx.html
5xx.html
will have to think about that...
thanks,
-g.