CFE-18 fixed any bug in errorHandler and notifications component

This commit is contained in:
AmirHossein Mahmoodi
2023-10-02 10:23:56 +03:30
parent 61da7b49bc
commit 49f8269c06
6 changed files with 6 additions and 6 deletions

View File

@@ -36,4 +36,4 @@ const ErrorNotification = (t, status, message) => {
);
};
export default ErrorNotification;
export default ErrorNotification;

View File

@@ -9,4 +9,4 @@ const PendingNotification = (t) => {
});
};
export default PendingNotification;
export default PendingNotification;

View File

@@ -39,4 +39,4 @@ const SuccessNotification = (t, status) => {
);
};
export default SuccessNotification;
export default SuccessNotification;

View File

@@ -35,4 +35,4 @@ const UploadFileNotification = (t) => {
);
};
export default UploadFileNotification;
export default UploadFileNotification;

View File

@@ -37,4 +37,4 @@ const WarningNotification = (t, status) => {
);
};
export default WarningNotification;
export default WarningNotification;

View File

@@ -48,7 +48,7 @@ const isServerError = status => status >= 500 && status <= 599;
const isClientError = status => status >= 400 && status <= 499;
const errorLogic = (response, t, notification) => {
if (notification) ErrorNotification(t, response.status)
if (notification) ErrorNotification(t, response.status, response.data.message)
}
const errorValidation = (response, t, notification) => {
if (notification) {