changed throwing errors to console.error in route