During the undo phase, a function call (%1!s!) to the primary replica returned an unexpected status (Code: %2!s!). Check ...

During the undo phase, a function call (%1!s!) to the primary replica returned an unexpected status (Code: %2!s!). Check for a possible cause in the SQL Server error log for the primary replica. If an error occurred on the primary database, you might need to suspend the secondary database, fix the issue on the primary database, and then resume the database.