HTTP 400 · Bad Request
POLL_ANSWER_INVALID
One of the poll answers is not acceptable.
HTTP 400
Polls & Quizzes
When & why it happens
The supplied poll answer 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 == "POLL_ANSWER_INVALID" {
// handle this error
}
}
Related errors
POLL_ANSWERS_INVALIDInvalid poll answers were provided.POLL_OPTION_DUPLICATEDuplicate poll options provided.POLL_OPTION_INVALIDInvalid poll option provided.POLL_QUESTION_INVALIDOne of the poll questions is not acceptable.POLL_UNSUPPORTEDThis layer does not support polls in the issued method.POLL_VOTE_REQUIREDCast a vote in the poll before calling this method.QUIZ_ANSWER_MISSINGYou can forward a quiz while hiding the original author only after choosing an option in the quiz.QUIZ_CORRECT_ANSWERS_EMPTYNo correct quiz answer was specified.QUIZ_CORRECT_ANSWER_INVALIDAn invalid value was provided to the correct_answers field.QUIZ_MULTIPLE_INVALIDQuizzes can't have the multiple_choice flag set!