The client library recognizes DatabaseNotFound errors and handles these by halting any further RPCs for the database, as the RPCs would fail. This should also be done for InstanceNotFound.
DatabaseNotFound
InstanceNotFound