HTTP 400 · Bad Request
PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN
Import for this chat is already in progress, wait %v minutes before starting a new one.
HTTP 400
Other
Parameterized
When & why it happens
A previous chat-history import is still running; wait the supplied minutes before starting a new one.
Parameterized error
The wire code carries a parameter on its tail (literal you'll see: PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_42MIN). 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, "PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT") {
secs := err.AdditionalInfo.(int)
time.Sleep(time.Duration(secs) * time.Second)
// retry
}
}
Related errors
ABOUT_TOO_LONGAbout string too long.ACTIVE_USER_REQUIREDThe method is only available to already activated users.ADDRESS_INVALIDThe specified geopoint address is invalid.ALBUM_PHOTOS_TOO_MANYYou have uploaded too many profile photos, delete some before retrying.ANONYMOUS_REACTIONS_DISABLEDSorry, anonymous administrators cannot leave reactions or participate in polls.ARTICLE_TITLE_EMPTYThe title of the article is empty.AUTOARCHIVE_NOT_AVAILABLEThe autoarchive setting is not available at this time; please check the client configuration.BANK_CARD_NUMBER_INVALIDThe specified card number is invalid.BANNED_RIGHTS_INVALIDYou provided some invalid flags in the banned rights.BASE_PORT_LOC_INVALIDBase port location invalid.BOOSTS_EMPTYNo boost slots were specified.BOOSTS_REQUIREDThe specified channel must first be boosted by its users in order to perform this action.