Update custom error handling