Removed error handling from middleware