GetSessionsById() exception if session doesn't exist anymore
If I call GetSessionsById() passing a sessionID (that I have stored into an external data base) of a session that doesn't exist anymore I get same exception.
"Invalid Session Id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx for user: nnnnnnnn:xxxxxxxx, at accessLevel: "The current user does not have access to call this method."
GetSessionsById() normally return the list of Sessions (IEnumerable<session>) with ID in the Guid array passed as parameter.
In this case (session that doesn't exist) , why the API doesn't return a list without the deleted session (or empty list if I passed just 1 Guid) but it cause an exception instead?
The only solution is to get the complete List of all existing sessions and check if my session is still present?
Joe Malmsten Panopto Employee
After taking a look at this API call it looks like this is expected behavior for when a session is invalid. If you need further assistance with this issue please speak with your Panopto support contact and have them open a support ticket with Panopto for more information.
I found this workaround:
I call this API GetSessionsAvailabilitySettings() instead
It also cause an exception but at least the ex.Message is more significant:
"The session with ID 'xxxxx-xxxxx-xx' was not found."