user.delete can return a non-json error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Triaged
|
Low
|
Unassigned |
Bug Description
Calling user.delete in some instances can return a non-json error message, e.g.
"("Cannot delete some instances of model 'User' because they are referenced through a protected foreign key: 'Node.owner'", <QuerySet [<Node: rynedt (valued-trout)>, <Node: phdhmt (apt-imp)>, <Node: k3qkkc (model-shrimp)>, <Node: k33w6k (loyal-flea)>, <Node: h7tep7 (smooth-goat)>, <Node: npsbcf (comic-lizard)>, <Node: g4gy3w (heroic-aphid)>, <Node: gy3qan (boss-wren)>, <Node: qg6qyx (steady-goose)>, <Node: fgndqh (model-bug)>, <Node: 8sp3b3 (rare-ghoul)>, <Node: dmmma4 (heroic-gator)>, <Node: m6anbb (eager-goose)>, <Node: egfebe (whole-macaw)>, <Node: 788ydm (guided-wren)>, <Node: tq3p8f (rich-moose)>, <Node: p7eshp (proven-mullet)>, <Node: ma6p7c (sought-lion)>, <Node: wn4gcx (fair-shiner)>, <Node: p6mdrg (cute-adder)>, '...(remaining elements truncated)...']>)"
We have better error handling in maas-ui to handle this now, but it would be nice if the error payload was consistently json.
Potentially this error should be a distinct bug as well.
Changed in maas: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in maas: | |
status: | Confirmed → Triaged |
Changed in maas: | |
milestone: | none → 3.5.0 |
Is this still happening?