Details
-
Type:
Bug
-
Status: Reopened
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Staff Interface
-
Labels:None
Description
When adding a service from the admin interface, it is possible that it may fail during creation (i.e., when the module processes API calls after the initial Module::validateService call).
In AdminClients::createService, each service (parent and add-on services) are added in a loop, but no check is done for errors, assuming all were successful. However, if the parent service failed, the add-on would still be attempted. Similarly, if the parent was successful, and an add-on failed, we would have only partial success.
I would suggest making this loop of adding services transaction-based, but it appears that this would lead to nested transactions. Instead, we may want to consider deleting any successful services if there were an error with any of them in order to manually rollback those additions.