Handle FILE_MIGRATE_[0-9] errors
This commit is contained in:
parent
97ef3b2276
commit
f21bc22a79
@ -355,7 +355,7 @@ export class ApiManager {
|
|||||||
this.invokeApi(method, params, options).then(deferred.resolve, rejectPromise);
|
this.invokeApi(method, params, options).then(deferred.resolve, rejectPromise);
|
||||||
}, rejectPromise);
|
}, rejectPromise);
|
||||||
} else if(error.code == 303) {
|
} else if(error.code == 303) {
|
||||||
const newDcId = +error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_|USER_MIGRATE_)(\d+)/)[2];
|
const newDcId = +error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_|USER_MIGRATE_|FILE_MIGRATE_)(\d+)/)[2];
|
||||||
if(newDcId != dcId) {
|
if(newDcId != dcId) {
|
||||||
if(options.dcId) {
|
if(options.dcId) {
|
||||||
options.dcId = newDcId;
|
options.dcId = newDcId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user