You should be doing your best to help users avoid triggering errors on your site and, when they do eventually trigger an error, making sure that the result doesn’t leave them trapped or abandoned. Make sure that any data the user has added is easily recoverable, their ‘shopping basket’ isn’t deleted, they’re not left stranded without proper navigation, etc