{"record":{"id":"c893b5c9f761f874","repo":"nopSolutions/nopCommerce","slug":"no-return-request-action-found-with-the-specified","errorCode":null,"errorMessage":"No return request action found with the specified id","messagePattern":"No return request action found with the specified id","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/Presentation/Nop.Web/Areas/Admin/Controllers/ReturnRequestController.cs","lineNumber":458,"sourceCode":"                return RedirectToAction(\"ReturnRequestActionList\");\n\n            return RedirectToAction(\"ReturnRequestActionEdit\", new { id = returnRequestAction.Id });\n        }\n\n        //prepare model\n        model = await _returnRequestModelFactory.PrepareReturnRequestActionModelAsync(model, returnRequestAction, true);\n\n        //if we got this far, something failed, redisplay form\n        return View(model);\n    }\n\n    [HttpPost]\n    [CheckPermission(StandardPermission.Configuration.MANAGE_SETTINGS)]\n    public virtual async Task<IActionResult> ReturnRequestActionDelete(int id)\n    {\n        //try to get a return request action with the specified id\n        var returnRequestAction = await _returnRequestService.GetReturnRequestActionByIdAsync(id)\n                                  ?? throw new ArgumentException(\"No return request action found with the specified id\", nameof(id));\n\n        await _returnRequestService.DeleteReturnRequestActionAsync(returnRequestAction);\n\n        _notificationService.SuccessNotification(await _localizationService.GetResourceAsync(\"Admin.Configuration.Settings.Order.ReturnRequestActions.Deleted\"));\n\n        return RedirectToAction(\"ReturnRequestActionList\");\n    }\n\n    #endregion\n\n    #endregion\n}","sourceCodeStart":440,"sourceCodeEnd":470,"githubUrl":"https://github.com/nopSolutions/nopCommerce/blob/64bdf2ff08c8b39e65717bcf974fb43dc2ef68f2/src/Presentation/Nop.Web/Areas/Admin/Controllers/ReturnRequestController.cs#L440-L470","documentation":"Thrown by ReturnRequestActionDelete (POST, MANAGE_SETTINGS) when GetReturnRequestActionByIdAsync(id) returns null. Mirror of error 491 for the action (not reason) side of return-request configuration; the entity is required to perform the delete. Includes nameof(id).","triggerScenarios":"Deleting a return-request action that was already removed; double-click on delete; tampered id; another admin reset return-request actions concurrently.","commonSituations":"Concurrent settings edits; restored DBs; fixtures; reorganized return-request actions in a parallel session.","solutions":["Refresh the return-request-action list and target a current row.","Prevent double-submit on the delete control.","Make the action idempotent: missing entity = success.","Validate id > 0 before posting."],"exampleFix":"// before\nvar returnRequestAction = await _returnRequestService.GetReturnRequestActionByIdAsync(id)\n                          ?? throw new ArgumentException(\"No return request action found with the specified id\", nameof(id));\n\n// after\nvar returnRequestAction = await _returnRequestService.GetReturnRequestActionByIdAsync(id);\nif (returnRequestAction == null)\n    return RedirectToAction(\"ReturnRequestActionList\");","handlingStrategy":"validation","validationCode":"if (id <= 0) return BadRequest();\nvar action = await _returnRequestService.GetReturnRequestActionByIdAsync(id);\nif (action == null) return RedirectToAction(\"ReturnRequestActionList\");","typeGuard":"// N/A","tryCatchPattern":"catch (ArgumentException ex) when (ex.ParamName == nameof(id))\n{ return RedirectToAction(\"ReturnRequestActionList\"); }","preventionTips":["Make delete idempotent (missing = success).","Disable the delete control after first click.","Refresh the actions list before deleting."],"tags":["nopcommerce","admin-controller","not-found","return-request","settings","delete"],"backgroundTag":null,"analyzedSha":"64bdf2ff08c8b39e65717bcf974fb43dc2ef68f2","analyzedAt":"2026-08-13T21:19:38.062Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}