Remove debugger statements and streamline error handling in MachineContainer
parent
82a4750c76
commit
181c565b3c
|
@ -34,7 +34,6 @@ const MachineContainer: React.FC<Props> = ({ machine, viewMode }) => {
|
||||||
|
|
||||||
const manageActionResponse = useCallback(
|
const manageActionResponse = useCallback(
|
||||||
(response: MachineActionResult) => {
|
(response: MachineActionResult) => {
|
||||||
debugger;
|
|
||||||
addLog(`Success: ${response.success}. Status: ${response.status}`);
|
addLog(`Success: ${response.success}. Status: ${response.status}`);
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
blip.success(response.status);
|
blip.success(response.status);
|
||||||
|
@ -53,10 +52,7 @@ const MachineContainer: React.FC<Props> = ({ machine, viewMode }) => {
|
||||||
endpoints.network.machine.shutdown,
|
endpoints.network.machine.shutdown,
|
||||||
mutationFetcher<ShutdownMachine>,
|
mutationFetcher<ShutdownMachine>,
|
||||||
{
|
{
|
||||||
onError: err => {
|
onError: err => blip.error(err.message),
|
||||||
debugger;
|
|
||||||
blip.error(err.message);
|
|
||||||
},
|
|
||||||
onSuccess: manageActionResponse
|
onSuccess: manageActionResponse
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue