Seaquel
SQL Server error code

SQL Server error 983

SQL Server raises error 983 at severity 14, which marks a problem with the query or data that you can correct.

Unable to access availability database '%.*ls' because the database replica is not in the PRIMARY or SECONDARY role. Connections to an availability database is permitted only when the database replica is in the PRIMARY or SECONDARY role. Try the operation again later.
Msg983
Severity14
Group0–999

Source: Database Engine events and errors