Reputation: 30
I have been following everything the total.js documentations have to offer to be able to work with the eshop project. however, sometimes i get errors and the only thing i see is 404 on the browser whether the error is from api or frontend or routing, so at this point, tracing errors feels virtually impossible and taking too much time.
is there any way i can get comprehensive error messages to be able to figure out what went wrong or which file to look at?
Upvotes: 0
Views: 55
Reputation: 748
You have several possibilities how to debug
:
// The route will be evaluated if the page won't exist
ROUTE('#404', function() {
var self = this;
// Here you can found info about the URL
console.log(404, self.url);
self.status = 404;
self.plain('404: Page not found');
});
Upvotes: 1