{"record":{"id":"fb1df07009abf0f1","repo":"Devolutions/UniGetUI","slug":"unsupported-queue-action-action","errorCode":null,"errorMessage":"Unsupported queue action \"{action}\".","messagePattern":"Unsupported queue action \"(.+?)\"\\.","errorType":"validation","errorClass":"InvalidOperationException","httpStatus":400,"severity":"warning","filePath":"src/UniGetUI.Interface.IpcApi/IpcOperationApi.cs","lineNumber":255,"sourceCode":"        {\n            throw new InvalidOperationException(\n                \"Only queued operations can be reordered.\"\n            );\n        }\n\n        switch (NormalizeQueueAction(action))\n        {\n            case \"run-now\":\n                tracked.Operation.SkipQueue();\n                break;\n            case \"run-next\":\n                tracked.Operation.RunNext();\n                break;\n            case \"run-last\":\n                tracked.Operation.BackOfTheQueue();\n                break;\n            default:\n                throw new InvalidOperationException($\"Unsupported queue action \\\"{action}\\\".\");\n        }\n\n        return IpcCommandResult.Success(\"reorder-operation\");\n    }\n\n    public static IpcCommandResult ForgetOperation(string operationId)\n    {\n        var tracked = GetTrackedOperation(operationId);\n        if (IsActive(tracked.Operation.Status))\n        {\n            throw new InvalidOperationException(\n                \"Running or queued operations cannot be forgotten.\"\n            );\n        }\n\n        ForgetTracking(operationId);\n        return IpcCommandResult.Success(\"forget-operation\");\n    }","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcOperationApi.cs#L237-L273","documentation":"Thrown by ReorderOperation when the action parameter does not normalize to one of 'run-now', 'run-next', or 'run-last'. NormalizeQueueAction trims and lower-cases the input before matching; any value outside the three accepted strings triggers this error (it also throws from NormalizeQueueAction itself with the same message, so the throw site depends on code path).","triggerScenarios":"Calling ReorderOperation with an action string that is not 'run-now', 'run-next', or 'run-last' (case-insensitive after trimming). Whitespace-only or null action throws ArgumentException from NormalizeQueueAction instead.","commonSituations":"Client sends a free-text action like 'cancel' or 'priority' to the reorder endpoint. Typo in the action string. Using a queue action from a different API version that was renamed. The AvailableQueueActions list on IpcOperationInfo provides the authoritative valid values.","solutions":["Use one of: 'run-now', 'run-next', 'run-last' (case-insensitive).","Read AvailableQueueActions from GetOperation to see exactly which actions are valid.","Add client-side validation against the AvailableQueueActions list before calling."],"exampleFix":"// before\nIpcOperationApi.ReorderOperation(opId, \"priority-high\");\n// after\nIpcOperationApi.ReorderOperation(opId, \"run-now\");","handlingStrategy":"validation","validationCode":"static readonly HashSet<string> ValidQueueActions = new(StringComparer.OrdinalIgnoreCase)\n{\n    \"run-now\", \"run-next\", \"run-last\"\n};\nif (!ValidQueueActions.Contains(action))\n    throw new ArgumentException($\"Invalid queue action: {action}. Valid: run-now, run-next, run-last\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only 'run-now', 'run-next', or 'run-last' (case-insensitive).","Read AvailableQueueActions from IpcOperationInfo for the authoritative valid set.","Normalize action strings to lowercase before sending."],"tags":["operations","ipc","validation","queue","parameters"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}