HTTP 400 · Bad Request
WEBPAGE_URL_INVALID
The specified webpage url is invalid.
HTTP 400
Web previews
When & why it happens
The supplied webpage url 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 == "WEBPAGE_URL_INVALID" {
// handle this error
}
}
Related errors
URL_INVALIDInvalid URL provided.WEBDOCUMENT_INVALIDInvalid webdocument URL provided.WEBDOCUMENT_MIME_INVALIDInvalid webdocument mime type provided.WEBDOCUMENT_SIZE_TOO_BIGWebdocument is too big!WEBDOCUMENT_URL_INVALIDThe specified webdocument URL is invalid.WEBPAGE_CURL_FAILEDFailure while fetching the webpage with cURL.WEBPAGE_MEDIA_EMPTYWebpage media empty.WEBPAGE_NOT_FOUNDA preview for the specified webpage url could not be generated.