HTTP 400 · Bad Request
MEDIA_INVALID
Media invalid.
HTTP 400
Media / Files
When & why it happens
The supplied media is malformed, points to nothing the server recognises, or fails a server-side validity check.
Handling in gogram
Surfaced as *gogram.ErrResponseCode. Match on the message:
if err, ok := err.(*gogram.ErrResponseCode); ok {
if err.Message == "MEDIA_INVALID" {
// handle this error
}
}
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.