File: slack_errors.go

package info (click to toggle)
golang-github-nicholas-fedor-shoutrrr 0.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,680 kB
  • sloc: sh: 74; makefile: 58
file content (21 lines) | stat: -rw-r--r-- 973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package slack

import "errors"

// ErrInvalidToken is returned when the specified token does not match any known formats.
var ErrInvalidToken = errors.New("invalid slack token format")

// ErrMismatchedTokenSeparators is returned if the token uses different separators between parts (of the recognized `/-,`).
var ErrMismatchedTokenSeparators = errors.New("invalid webhook token format")

// ErrAPIResponseFailure indicates a failure in the Slack API response.
var ErrAPIResponseFailure = errors.New("api response failure")

// ErrUnknownAPIError indicates an unknown error from the Slack API.
var ErrUnknownAPIError = errors.New("unknown error from Slack API")

// ErrWebhookStatusFailure indicates a failure due to an unexpected webhook status code.
var ErrWebhookStatusFailure = errors.New("webhook status failure")

// ErrWebhookResponseFailure indicates a failure in the webhook response content.
var ErrWebhookResponseFailure = errors.New("webhook response failure")