Updated app error handling