adjusted frontend error handling