Errors similar to the following:
sonarrerrorpipeline GET /api/v3/queue/status: Expected query to return 1 rows but returned 0
can be fixed by going to System→Tasks, running the Housekeeping task and then restarting Sonarr.
System→Tasks
Housekeeping