Helper methods for checking failed state on databases/operations