chore:variable (#4946)

This commit is contained in:
Ong Chung Yau
2025-07-25 19:51:14 +08:00
committed by GitHub
parent 8562d4a563
commit caffad0fb0
3 changed files with 18 additions and 7 deletions
@@ -114,7 +114,7 @@ const AddEditVariableDialog = ({ show, dialogProps, onCancel, onConfirm, setErro
if (setError) setError(err)
enqueueSnackbar({
message: `Failed to add new Variable: ${
typeof error.response.data === 'object' ? error.response.data.message : error.response.data
typeof err.response.data === 'object' ? err.response.data.message : err.response.data
}`,
options: {
key: new Date().getTime() + Math.random(),
@@ -155,11 +155,11 @@ const AddEditVariableDialog = ({ show, dialogProps, onCancel, onConfirm, setErro
})
onConfirm(saveResp.data.id)
}
} catch (error) {
} catch (err) {
if (setError) setError(err)
enqueueSnackbar({
message: `Failed to save Variable: ${
typeof error.response.data === 'object' ? error.response.data.message : error.response.data
typeof err.response.data === 'object' ? err.response.data.message : err.response.data
}`,
options: {
key: new Date().getTime() + Math.random(),