HTTP 303 · See Other
FILE_MIGRATE_X
The file to be accessed is currently stored in DC %v.
HTTP 303
Migration
Parameterized
When & why it happens
The requested file lives on a different DC. Re-issue the upload/download against DC X.
Parameterized error
The wire code carries a parameter on its tail (literal you'll see: FILE_MIGRATE_42). Gogram parses it out and stores it on ErrResponseCode.AdditionalInfo with the right type.
Handling in gogram
Surfaced as *gogram.ErrResponseCode. Match on the message:
if err, ok := err.(*gogram.ErrResponseCode); ok {
if strings.HasPrefix(err.Message, "FILE_MIGRATE") {
secs := err.AdditionalInfo.(int)
time.Sleep(time.Duration(secs) * time.Second)
// retry
}
}
Related errors
NETWORK_MIGRATE_XThe source IP address is associated with DC %v.PHONE_MIGRATE_XThe phone number a user is trying to use for authorization is associated with DC %v.STATS_MIGRATE_XThe channel statistics must be fetched from DC %v.USER_MIGRATE_XThe user whose identity is being used to execute queries is associated with DC %v.