mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
improve csrf expiration error handling (#2695)
* add message * re run query on result set mount if there is session time out error
This commit is contained in:
committed by
Maxime Beauchemin
parent
5fd0e7d028
commit
2d5beb1f91
@@ -151,6 +151,9 @@ export function runQuery(query) {
|
||||
} else if (msg === null) {
|
||||
msg = `[${textStatus}] ${errorThrown}`;
|
||||
}
|
||||
if (msg.indexOf('The CSRF token is missing') > 0) {
|
||||
msg = 'Your session timed out, please refresh your page and try again.';
|
||||
}
|
||||
dispatch(queryFailed(query, msg));
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user