Better frontend error handling