List of Exceptions in ACC

This page lists the exceptions thrown in the ACC backend and how to replicate them. When one of these exceptions is not handled, the global exception filter (Program.cs:447) logs An unhandled exception occurred. System.Exception: <message> in the ACC log and returns the message to the UI, where it is shown in the error toast. Validation errors shown in the UI are listed in List of Errors in ACC.

Agents and deployments

  1. Exception:
    Not found
    

Thrown when we delete an agent that no longer exists (for example it was already deleted from another tab or by another user).

Source: AgentService.cs:1395 (DeleteAgent)
API: DELETE /api/agent/{agentId}, POST /api/agent/delete/agents

Steps to replicate:

  • Open Agent Repository in two browser tabs.

  • Delete an agent in the first tab.

  • Delete the same agent in the second tab without refreshing. This exception will come.


  1. ArgumentException:
    Unexpected runStatus value: Stopped
    

Thrown on the Diagnostics page API when the run status filter is not one of AllTypeRun, Succeeded, Failed, Running or Queuing. The UI only sends these values, so it comes only from a direct API call.

Source: AgentService.cs:2376 (GetDiagnosticsAgentsCompleted)
API: POST /api/agent/diagnosticAgents

Steps to replicate:

  • Call POST /api/agent/diagnosticAgents (Postman or API key) with runStatus = Stopped (or Starting).

  • This exception will come.


  1. ArgumentNullException:
    Agent ID cannot be null. (Parameter 'agentId')
    

Thrown when a bulk request contains an empty/null agent ID.

Source: AgentService.cs:3119 (GetAgentNameByAgentId)
API: POST /api/job/bulkStart, POST /api/run/agent/stopAllAgentRuns

Steps to replicate:

  • Call POST /api/job/bulkStart (or POST /api/run/agent/stopAllAgentRuns) with a list that contains a null agent ID.

  • This exception will come.


  1. Exception:
    Error getting agent logs from server Server-1. No connection could be made because the target machine actively refused it.
    

Thrown when we open the log of an agent deployment and ACC cannot reach the SE service on that server. The connection error is added at the end.

Source: DeploymentService.cs:1834 / 1838 (GetDeployedAgentLogs)
API: GET /api/agent/deployment/{deploymentId}/log

Steps to replicate:

  • Deploy an agent to a server.

  • Stop the SE service on that server.

  • Open the agent deployment and click View Log. This exception will come.


  1. Exception:
    Error getting schedule logs from server Server-1. ...
    

Thrown when we open the log of a server-side (SE) schedule and the SE service is not reachable.

Source: DeploymentService.cs:1865 / 1869 (GetDeployedScheduleLogs)
API: GET /api/agent/schedule/{scheduleId}/log

Steps to replicate:

  • Deploy an agent to a server that has an SE schedule.

  • Stop the SE service on that server.

  • Open the schedule log from the deployment. This exception will come.


  1. Exception:
    Error accessing schedules on server Server-1. ...
    

Thrown when ACC reads the SE schedules of a deployment or of a server and the SE service is not reachable.

Source: DeploymentService.cs:284 / 288 (GetDeploymentSchedules)
API: GET /api/agent/deployment/{deploymentId}/serverSchedules, GET /api/organization/server/{serverId}/schedules

Steps to replicate:

  • Deploy an agent to a server.

  • Stop the SE service on that server.

  • Open the deployment's Server Schedules (or Organization > Server > Schedules). This exception will come.


  1. Exception:
    Error accessing agent on server Server-1. ...
    

Thrown when ACC reads the status, or the sessions and input parameters, of a deployed agent and the SE service is not reachable.

Source: DeploymentService.cs:374 / 378 (GetDeployedAgentStatus), 412 / 416 (GetDeployedAgentSessionsAndPars)
API: GET /api/agent/deployment/{deploymentId}/status, GET /api/agent/deployment/{deploymentId}/sessionsAndPars

Steps to replicate:

  • Deploy an agent to a server.

  • Stop the SE service on that server.

  • Open the deployment status, or open Run Agent so ACC loads sessions/parameters. This exception will come.


  1. Exception:
    Error updating schedule on server Server-1. ...
    

Thrown when we edit a server-side (SE) schedule from ACC and the SE service is not reachable.

Source: DeploymentService.cs:1158 / 1162 (UpdateSchedule)
API: PUT /api/agent/schedule/{scheduleId}

Steps to replicate:

  • Open an SE schedule of a deployed agent in ACC.

  • Stop the SE service on that server.

  • Change the schedule and save. This exception will come.


  1. Exception:
    Invalid ACC version
    

Thrown when a version string does not have exactly 3 parts (x.y.z). It is used for the SE software version sent at agent check-in and for the SE version returned by a server on refresh/online. A 2-part (3.5) or 4-part (3.5.0.1464) version causes it.

Source: AppConstents.cs:46 (GetVersionNumber)
API: POST /api/agent/version/, GET /api/server/{serverId}/refreshServer, GET /api/organization/servers/refresh

Steps to replicate:

  • Check in an agent (POST /api/agent/version/) with SoftwareVersion = 3.5 or 3.5.0.1464.

  • Or refresh a server whose SE returns a version that is not x.y.z. This exception will come.


Jobs, runs and schedules

  1. Exception:
    Run already exist with the given runId 114 and sessionId=2_576
    

Thrown by cluster start when a run with the same agent, Run ID and session ID already exists in AgentRun or AgentRunHistory. It also comes when SE/chain retries a cluster start that was already accepted. On 12 Oct this was the error returned for the hung Lowes chain requests.

Source: JobService.cs:1242 (clusterAgentRunStartingWithLock)
API: POST /api/agent/{agentId}/cluster/start

Steps to replicate:

  • Start an agent on a cluster with custom Run ID 5 and session ID 1_2 and let it start.

  • Start it again on the cluster with the same Run ID and session ID. This exception will come.


  1. Exception:
    Invalid job chain. Agent does not exist in the same directory as the parent agent.
    

Thrown when a job finishes and starts its chained agent, but the chained agent is in a different directory (for example it was moved after the chain was set).

Source: JobService.cs:4894 (startAgentChain)
API: POST /api/run/{agentRunId}/completed

Steps to replicate:

  • Set a job chain from Agent-A to Agent-B (same directory).

  • Move Agent-B to another directory.

  • Run Agent-A and let the run complete. This exception will come (logged on run completed).


  1. Exception:
    <error message from the chained agent start>
    

Thrown when starting the chained agent fails. The message is the start error of the chained agent (for example rate limit, job in failure, agent not deployed).

Source: JobService.cs:4906 (startAgentChain)
API: POST /api/run/{agentRunId}/completed

Steps to replicate:

  • Set a job chain from Agent-A to Agent-B.

  • Remove Agent-B from its cluster (or apply a rate limit that blocks it).

  • Run Agent-A and let the run complete. This exception will come with Agent-B's start error.


  1. Exception:
    You can't update time of once job schedule once it is in progress or completed
    

Thrown when we change an enabled Once schedule that has already run. (Also listed in List of Errors in ACC.)

Source: JobService.cs:5545 (AddOrUpdateScheduleWithLock)
API: POST /api/job/{agentId}/schedule, POST /api/job/agentIds/schedules

Steps to replicate:

  • Add a Once schedule for a deployed agent and let it run.

  • Edit the schedule, change the time and save. This exception will come.


  1. Exception:
    Invalid CRON: 0 0 31 2 *
    

Thrown when a schedule is added to the scheduler and no next run time can be calculated from its CRON (valid format but never fires, e.g. 31 February).

Source: JobService.cs:7761 (getQuartzTrigger)
API: POST /api/job/{agentId}/schedule(s), POST /api/job/schedule/{scheduleId}/on

Steps to replicate:

  • Add a schedule with a custom CRON that never fires, e.g. 0 0 31 2 *.

  • Save the schedule or turn it on. This exception will come.


  1. Exception:
    Agent {agentId} not found.
    

Thrown while creating the job failure email/ticket when the agent's directory cannot be found (agent deleted while its job was running). It is caught and logged.

Source: JobService.cs:7973 (generateJobProgressFailureEmailAndTicket)
API: POST /api/run/{agentRunId}/completed

Steps to replicate:

  • Start a job with success criteria that will fail.

  • While it runs, delete the agent (or its directory).

  • Let the run complete. This exception will be logged.


  1. Exception:
    Exception thrown in SessionId validation:
    

Thrown when session ID validation fails with an unexpected error (not a format error). The inner exception has the details.

Source: JobService.cs:9087 (validateSession)
API: POST /api/job/{agentId}/start, POST /api/agent/{agentId}/cluster/start, POST /api/job/{agentId}/schedule

Steps to replicate:

  • Start an agent (job start, cluster start or schedule) with a malformed session value, e.g. 1_ or _2, through the API.

  • This exception will come if parsing fails with a non-format error.


  1. Error (scheduler log):
    Error executing job schedule. 2. Unexpected behaviour noticed! Please report the same. The system was trying to create a duplicate run into the AgentRun table which is already became an AgentRunHistory now. The process aborted with the error. duplicate/completed run={...}
    

Why it comes: when One Job Per Schedule is off and the agent has more than one enabled schedule, the job is completed only after all enabled schedules (in the same schedule group) are Succeeded or Failed. If one schedule fires again while the job is still In Progress (another schedule has not finished yet), ACC reuses the same Run ID, and the session of this schedule has already completed in that job, so the start is aborted.

Side effect: after this error, the job is set to Failure (or Failed when Continue on Failure is enabled). With Continue on Failure disabled, the next starts are blocked with “The Agent-1 job is in failure. Please manually change the job status to failed or succeeded…”.

Related message: “1. Unexpected behaviour noticed! … duplicate run into the AgentRun table but is not in running state” (JobService.cs:3702 / 3703) comes when the same run is still in AgentRun but not running.

Steps to replicate:

  • Open the job settings of a test agent: turn off One Job Per Schedule and set Continue on Failure to No.

  • Add Schedule A: enabled, repeats every 15 minutes, session range 1/5 (or 1/1), any input file.

  • Add Schedule B on the same agent: enabled, first run tomorrow, same (empty) schedule group as Schedule A.

  • Let Schedule A fire and the run complete. The run shows Completed in Run History, but the job stays In Progress because Schedule B has not run.

  • Wait for the next fire of Schedule A. No run starts, this error comes, and the job changes to Failure.

Workaround: manually set the job status to Succeeded or Failed in Job History, then either turn on One Job Per Schedule or disable the schedules that are not in use.


Clusters and servers

  1. Exception:
    Cluster name '{cluster.Name}' already exist, please choose a different cluster name
    

Thrown when an organization super admin adds a cluster with a name that already exists. Note: the message shows the literal text {cluster.Name} instead of the name (double braces in code).

Source: ClusterController.cs:163 (AddCluster)
API: POST /api/cluster/

Steps to replicate:

  • Log in as an organization super admin.

  • Add a cluster with the name of an existing cluster. This exception will come.


  1. Exception:
    Cluster created but could not be added to organization, Error: ...
    

Thrown when the cluster is created but linking it to the user's organization fails (for example a DB error). The cluster remains created.

Source: ClusterController.cs:176 (AddCluster)
API: POST /api/cluster/

Steps to replicate:

  • Add a cluster as an organization super admin while the link to the organization fails (e.g. DB connection drop).

  • This exception will come.


  1. Exception:
    Error during adding cluster servers to the organization, Error: ...
    

Thrown when the cluster is created but its servers cannot be added to the organization. Because of the outer catch, the message can repeat (Error: System.Exception: Error during adding...).

Source: ClusterController.cs:184 / 189 (AddCluster)
API: POST /api/cluster/

Steps to replicate:

  • Add a cluster as an organization super admin while a server of the cluster cannot be added to the organization.

  • This exception will come.


  1. Exception:
    Error updating cluster resource info. Cluster {clusterId} does not exist.
    

Thrown when a server sends updateServerInfo and its cluster has been deleted.

Source: ClusterService.cs:1552 (UpdateClusterResourceInfoWithLock)
API: POST /api/server/updateServerInfo, POST /api/organization/updateServerInfo

Steps to replicate:

  • Add a server to a cluster.

  • Delete the cluster while the server is still sending updates (or call updateServerInfo with the old cluster).

  • This exception will come.


  1. Exception:
    <Error returned by the SE server>
    

Thrown on server refresh/online when the SE server response contains an Error (for example invalid key, licence error).

Source: ServerService.cs:433 (getServerViewModelWithLock)
API: GET /api/server/{serverId}/refreshServer, /onlineServer, /offlineServer, GET /api/organization/servers/refresh

Steps to replicate:

  • Add a server with a wrong key, or deactivate the SE licence on the server.

  • Refresh the server or bring it online. This exception will come with the SE error.


  1. Exception:
    Error. <connection error>
    

Thrown when ACC opens server or agent performance and cannot download the data from the SE server.

Source: ServerService.cs:1205 (GetServerResourceData), 1226 (GetServerAgentsResourceData)
API: GET /api/server/{serverId}/performance, GET /api/server/{serverId}/agent-performance

Steps to replicate:

  • Stop the SE service on a server.

  • Open Servers > Performance (or Agent performance) for that server. This exception will come.


Directories, schema and shared content

  1. Exception:
    Cannot update Root path
    

Thrown when we update or move the root directory of an organization (directory without a parent). Same for job settings.

Source: DirectoryService.cs:515 (UpdateDirectory), 547 (UpdateDirectoryJobSettings)
API: PUT /api/directory/{directoryId}, PUT /api/directory/{directoryId}/move

Steps to replicate:

  • Call PUT /api/directory/{rootDirectoryId} (or /move) with the organization root directory.

  • This exception will come.


  1. Exception:
    Cannot add a root path
    

Thrown when we add a directory without a parent directory.

Source: DirectoryService.cs:624 (AddSubDirectory)
API: POST /api/directory/

Steps to replicate:

  • Call POST /api/directory/ with ParentId empty.

  • This exception will come.


  1. Exception:
    Invalid Schema: <parse error>
    

Thrown when we save an export schema whose text is not a valid schema.

Source: ExportSchemaService.cs:111 (AddOrUpdateSchema)
API: POST /api/schema/text

Steps to replicate:

  • Open a directory and edit Export Schema.

  • Enter invalid schema text (e.g. random text) and save. This exception will come.


  1. Exception:
    Read/Write operation failed for shared content. File was supposed to be present but it's not available\\server\share\...
    

Thrown when ACC writes shared content from DB to the network path and the file is not there afterwards (no write access or path unavailable).

Source: PerformanceSharedService.cs:152 (GetSharedContent)
API: GET /api/shared/{sharedId}/file, POST /api/shared/addSharedFolder

Steps to replicate:

  • Set the shared content network path to a folder ACC cannot write to.

  • Download a shared file/folder or add a shared folder. This exception will come.


  1. Exception:
    <file copy error> (e.g. Could not find file ...)
    

Thrown on Get Logs when the log file cannot be copied (file missing or locked). Agent/Directory not found variants: "Agent not found for AgnetId {id}", "Directory not found for DirectoryId {id}".

Source: FileLogController.cs:213, 241, 252, 273; FileLoggerService.cs:217, 240
API: GET /api/filelog/{agentId}/filelog/{fileName}, GET /api/filelog/directory/{directoryId}/filelog/{fileName}

Steps to replicate:

  • Open Get Logs for an agent (or directory).

  • Request a log file name that does not exist (or delete it from disk first). This exception will come.


Tickets

  1. Exception:
    Ticket not found, ticketId: {id}
    

Thrown when we close or assign tickets in bulk and one of the selected tickets was deleted meanwhile.

Source: TicketService.cs:1139 (CloseTickets), 1692 (AssignBulkTickets)
API: POST /api/ticket/CloseTickets, POST /api/ticket/assignBulkTickets

Steps to replicate:

  • Select tickets in the Tickets list.

  • Delete one of them from another tab.

  • Click Close (or Assign) for the selection. This exception will come.


  1. Exception:
    Ticket Not found
    

Thrown when a ticket being deleted (directly or while deleting its agent/directory) no longer exists.

Source: TicketService.cs:359 (DeleteTicket)
API: DELETE /api/ticket/DeleteTicket/{id}, DELETE /api/agent/{agentId}, DELETE /api/directory/{directoryId}

Steps to replicate:

  • Open a ticket in two tabs and delete it in the first.

  • Delete it again in the second tab. This exception will come.


  1. Exception:
    Not found
    

Thrown when we delete a ticket post or attachment that no longer exists.

Source: TicketService.cs:301, 408, 432
API: DELETE /api/ticket/DeletePost/{id}, DELETE /api/ticket/DeleteAttachment/{id}

Steps to replicate:

  • Open a ticket in two tabs and delete a post (or attachment) in the first.

  • Delete the same post (or attachment) in the second tab. This exception will come.


  1. Exception:
    Ticket post not found / Ticket not found
    

Thrown when the ticket post email is sent for a post or ticket that was deleted.

Source: TicketService.cs:1288 / 1294 (SendPostCreatedOrUpdatedEmail)
API: POST /api/ticket/postNewPost, /ticketPostCreateEmail, /ticketPostUpdateEmail

Steps to replicate:

  • Add a post to a ticket and delete the post (or ticket) immediately.

  • The post created/updated email call fails with this exception.


Users and organizations

  1. Exception:
    A logged in user can't disable or enable to himself
    

Thrown when an admin disables or enables their own user.

Source: UserController.cs:519 (DisableUser)
API: PUT /api/user/{userAccountId}/disableOrEnable

Steps to replicate:

  • Log in as an admin and go to Users.

  • Disable your own user. This exception will come.


  1. Exception:
    A logged in user can't delete his/her account by himself
    

Thrown by the delete user API when the user deletes their own account (the UI blocks this earlier).

Source: UserController.cs:970 (DeleteUser)
API: PUT /api/user/deleteUser/{userId}

Steps to replicate:

  • Call PUT /api/user/deleteUser/{yourUserId} with your own login.

  • This exception will come.


  1. Exception:
    User does not exist
    

Thrown when we delete or recover a user that does not exist (already permanently removed).

Source: UserService.cs:1132 (DeleteUser), 1148 (RecoverUser)
API: PUT /api/user/deleteUser/{userId}, PUT /api/user/recoverUser/{userId}

Steps to replicate:

  • Open Users in two tabs and delete a user in the first.

  • Delete (or recover) the same user in the second tab. This exception will come.


  1. Exception:
    Error while adding/deleting roles to user account
    

Thrown when saving a user and updating roles or directory privileges fails (DB error, invalid directory).

Source: UserService.cs:1289 (AddOrRemoveUserRoles), PrivilegeService.cs:319 (AddOrRemoveUserDirectoryPrivileges)
API: POST /api/user/AddUser, PUT /api/user/UpdateUser/{userId}

Steps to replicate:

  • Edit a user, change roles or directory privileges, and save while a selected directory has been deleted.

  • This exception will come.


  1. Exception:
    Error while adding/deleting application to user account
    

Thrown when saving a user and updating the user's applications fails.

Source: UserService.cs:1628 (AddOrRemoveUserApplications)
API: PUT /api/user/UpdateUser/{userId}

Steps to replicate:

  • Edit a user, change applications and save while the application update fails.

  • This exception will come.


  1. Exception:
    Organization doesn't exist
    

Thrown when we disable/enable an organization that was deleted.

Source: OrganizationController.cs:955, JobService.cs:9825 (DisableOrEnableOrganization)
API: PUT /api/organization/{organizationId}/disableOrEnable

Steps to replicate:

  • Open Organizations in two tabs and delete an organization in the first.

  • Disable it in the second tab. This exception will come.


  1. Exception:
    You can't disable your organization yourself
    

Thrown when a user disables their own organization. (Also listed in List of Errors in ACC.)

Source: OrganizationController.cs:959
API: PUT /api/organization/{organizationId}/disableOrEnable

Steps to replicate:

  • Log in with a user of Org-A.

  • Disable Org-A. This exception will come.


  1. Exception:
    Invalid XML RSA key.
    

Thrown when text is encrypted with an organization public key that is not valid RSA XML.

Source: MiscExtensions.cs:79 (FromXmlStringImp)
API: PUT /api/organization/encrypt

Steps to replicate:

  • Set an invalid public key for the organization (not <RSAKeyValue> XML).

  • Call PUT /api/organization/encrypt. This exception will come.


Configuration and security

  1. Exception:
    Couldn't find acc url configuration
    

Thrown when the ACC URL is not set in App Config.

Source: AppConfigController.cs:567 (GetAccUrl)
API: GET /api/app-config/get-acc-url

Steps to replicate:

  • Clear the ACC URL in App Config.

  • Open any page that calls GET /api/app-config/get-acc-url (e.g. email links). This exception will come.


  1. Exception:
    Error executing <SQL script>. <SQL error>
    

Thrown when creating or upgrading the ACC database and a SQL script fails.

Source: AppConfigService.cs:439 (executeSqlScript)
API: POST /api/app-config/, POST /api/app-config/update-db

Steps to replicate:

  • Run ACC database create/upgrade (App Config > Update database) with a DB user that has no DDL rights.

  • This exception will come.


  1. ArgumentException:
    Not a valid encrypted string (Parameter 'encrypted')
    

Thrown when a stored encrypted value (password, connection, config) is shorter than 17 bytes or was encrypted with another key.

Source: FastEncryption.cs:98, 123, 136
API: POST /api/app-config/send-test-email, POST /api/app-config/test-database-connection, GET /api/connection/{id}/zip

Steps to replicate:

  • Edit an encrypted value in the DB (e.g. SMTP password) to a short plain value.

  • Send a test email / test DB connection / download a connection file. This exception will come.


Internal exceptions (not reachable from UI)

Exception

Source

Note

NotImplementedException (7)

ControlCenterContext.cs:12-30

Stub methods (throw NotImplementedException); the working implementations are in the partial context class.

ArgumentNullException (context / requirement)

RequireMfaHandler.cs:18, 20

Framework guard in MFA policy handler.

ArgumentException: CSP does not contain a private key

CryptoUtils.cs:55

Key export helper; only with a public-only key.

ArgumentOutOfRangeException: Length must be non-negative

CryptoUtils.cs:163

DER encoding helper guard.

Exception: Invalid CRON {cron}

CronExpressionParser.cs:19

GetNextRuntimeOrError is not called anywhere.

Exception: Required ticket id is missing

TicketService.cs:883

Guid can never be null, so this never fires.