aboutsummaryrefslogtreecommitdiff
path: root/errors.go
blob: 25e9e0c6edd114710b9fdf91cbffc8a69aee8a13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package inwx

import "fmt"

// ErrUnexpectedStatus indicates that a Call was responded to
// but the Status doesn't match any of the expected Statuses of the Call.
type ErrUnexpectedStatus struct {
	Expected []Status
	Got      Status
}

func (e *ErrUnexpectedStatus) Error() string {
	const format = "unexpected status code: expected %v, got %v"
	return fmt.Sprintf(format, e.Expected, e.Got)
}