chore: Fix loading state in the inbox settings page (#4926)
This commit is contained in:
@@ -45,3 +45,13 @@ export const clearCookiesOnLogout = () => {
|
||||
const logoutRedirectLink = globalConfig.LOGOUT_REDIRECT_LINK || '/';
|
||||
window.location = logoutRedirectLink;
|
||||
};
|
||||
|
||||
export const parseAPIErrorResponse = error => {
|
||||
if (error?.response?.data?.message) {
|
||||
return error?.response?.data?.message;
|
||||
}
|
||||
if (error?.response?.data?.error) {
|
||||
return error?.response?.data?.error;
|
||||
}
|
||||
return error;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user