HTTP 500 · Internal Server Error
HTTP 500 Other

When & why it happens

A server-side timeout occurred while reuploading the file to the CDN DC. Treated by gogram as a regular API error; inspect ErrResponseCode.Message for the exact code.

Handling in gogram

Surfaced as *gogram.ErrResponseCode. Match on the message:

if err, ok := err.(*gogram.ErrResponseCode); ok { if err.Message == "CDN_UPLOAD_TIMEOUT" { // handle this error } }