// errHTTP is a generic HTTP error for any non-200 HTTP error
typeerrHTTPstruct{
Codeint`json:"code,omitempty"`
HTTPCodeint`json:"http"`
Messagestring`json:"error"`
Linkstring`json:"link,omitempty"`
}
func(eerrHTTP)Error()string{
returne.Message
}
func(eerrHTTP)JSON()string{
b,_:=json.Marshal(&e)
returnstring(b)
}
var(
errHTTPBadRequestEmailDisabled=&errHTTP{40001,http.StatusBadRequest,"e-mail notifications are not enabled","https://ntfy.sh/docs/config/#e-mail-notifications"}
errHTTPBadRequestDelayNoCache=&errHTTP{40002,http.StatusBadRequest,"cannot disable cache for delayed message",""}
errHTTPBadRequestDelayNoEmail=&errHTTP{40003,http.StatusBadRequest,"delayed e-mail notifications are not supported",""}
errHTTPBadRequestDelayCannotParse=&errHTTP{40004,http.StatusBadRequest,"invalid delay parameter: unable to parse delay","https://ntfy.sh/docs/publish/#scheduled-delivery"}
errHTTPBadRequestDelayTooSmall=&errHTTP{40005,http.StatusBadRequest,"invalid delay parameter: too small, please refer to the docs","https://ntfy.sh/docs/publish/#scheduled-delivery"}
errHTTPBadRequestDelayTooLarge=&errHTTP{40006,http.StatusBadRequest,"invalid delay parameter: too large, please refer to the docs","https://ntfy.sh/docs/publish/#scheduled-delivery"}
errHTTPBadRequestSinceInvalid=&errHTTP{40008,http.StatusBadRequest,"invalid since parameter","https://ntfy.sh/docs/subscribe/api/#fetch-cached-messages"}
errHTTPNotFound=&errHTTP{40401,http.StatusNotFound,"page not found",""}
errHTTPTooManyRequestsLimitRequests=&errHTTP{42901,http.StatusTooManyRequests,"limit reached: too many requests, please be nice","https://ntfy.sh/docs/publish/#limitations"}
errHTTPTooManyRequestsLimitEmails=&errHTTP{42902,http.StatusTooManyRequests,"limit reached: too many emails, please be nice","https://ntfy.sh/docs/publish/#limitations"}
errHTTPTooManyRequestsLimitSubscriptions=&errHTTP{42903,http.StatusTooManyRequests,"limit reached: too many active subscriptions, please be nice","https://ntfy.sh/docs/publish/#limitations"}
errHTTPTooManyRequestsLimitTotalTopics=&errHTTP{42904,http.StatusTooManyRequests,"limit reached: the total number of topics on the server has been reached, please contact the admin","https://ntfy.sh/docs/publish/#limitations"}
errHTTPTooManyRequestsAttachmentBandwidthLimit=&errHTTP{42905,http.StatusTooManyRequests,"too many requests: daily bandwidth limit reached","https://ntfy.sh/docs/publish/#limitations"}
errHTTPInternalError=&errHTTP{50001,http.StatusInternalServerError,"internal server error",""}
errHTTPInternalErrorInvalidFilePath=&errHTTP{50002,http.StatusInternalServerError,"internal server error: invalid file path",""}