HTTP 400 · Bad Request
FILE_PART_X_MISSING
Part %v of the file is missing from storage.
HTTP 400
Media / Files
Parameterized
When & why it happens
A required file part x was omitted from the request. Populate it and retry.
Parameterized error
The wire code carries a parameter on its tail (literal you'll see: FILE_PART_42_MISSING). 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_PART_X_MISSING") {
secs := err.AdditionalInfo.(int)
time.Sleep(time.Duration(secs) * time.Second)
// retry
}
}
Related errors
AUDIO_CONTENT_URL_EMPTYThe remote URL specified in the content field is empty.AUDIO_TITLE_EMPTYAn empty audio title was provided.DOCUMENT_INVALIDThe specified document is invalid.FILE_CONTENT_TYPE_INVALIDFile content-type is invalid.FILE_EMPTYAn empty file was provided.FILE_EMTPYAn empty file was provided.FILE_ID_INVALIDThe provided file id is invalid.FILE_PARTS_INVALIDThe number of file parts is invalid.FILE_PART_EMPTYThe provided file part is empty.FILE_PART_INVALIDThe file part number is invalid.FILE_PART_LENGTH_INVALIDThe length of a file part is invalid.FILE_PART_SIZE_CHANGEDProvided file part size has changed.