HTTP 303 · See Other
HTTP 303 Migration Parameterized

When & why it happens

The auth key/account lives on a different data center. Reconnect to DC X and replay the request; the gogram client handles this transparently.

Parameterized error

The wire code carries a parameter on its tail (literal you'll see: NETWORK_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, "NETWORK_MIGRATE") { secs := err.AdditionalInfo.(int) time.Sleep(time.Duration(secs) * time.Second) // retry } }