Did You solve this problem?
We have also similar problem when reading items from queue.
We receive error:
System.Exception: Response status code does not indicate success: 500 (Internal Server Error).
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
The issue is the user that is used by Orchestrator to connect to the SQL Database does not have the EXECUTE PERMISSION on the SQL stored procedures.
The next item from the queue based on priority, due date and defer date is obtained by a stored procedure.
The user that is used for authentication to the SQL db needs to:
a) either be db_owner on the database
b) or have db_datareader, db_datawriter, db_ddladmin and EXECUTE permission on all the stored procedures from the UiPath database