HTTP 400 · Bad Request
HTTP 400 Messages

When & why it happens

The server is rate-limiting this operation. Sleep for the duration the server reports before retrying.

Handling in gogram

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

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