Subscription refresh: refresh the page on a 403
A 403 indicates the session isn't valid any more, and a window reload will fix that (either by automatically logging in via Blender ID or by providing a login prompt).
This commit is contained in:
@@ -59,7 +59,13 @@ script.
|
|||||||
.done(function() {
|
.done(function() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function(err) {
|
||||||
|
if (err.status == 403) {
|
||||||
|
/* This happens when we are no longer logged in properly, so just refresh the
|
||||||
|
* page to get a proper status. */
|
||||||
|
window.location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
alert('Unable to update subscription, please check your internet connection.');
|
alert('Unable to update subscription, please check your internet connection.');
|
||||||
})
|
})
|
||||||
;
|
;
|
||||||
|
Reference in New Issue
Block a user