Rename TryAgainLater status code to ServerTimeout
This commit is contained in:
@@ -46,8 +46,8 @@ func TestErrorNew(t *testing.T) {
|
||||
if IsForbidden(err) {
|
||||
t.Errorf("expected to not be %s", api.StatusReasonForbidden)
|
||||
}
|
||||
if IsTryAgainLater(err) {
|
||||
t.Errorf("expected to not be %s", api.StatusReasonTryAgainLater)
|
||||
if IsServerTimeout(err) {
|
||||
t.Errorf("expected to not be %s", api.StatusReasonServerTimeout)
|
||||
}
|
||||
if IsMethodNotSupported(err) {
|
||||
t.Errorf("expected to not be %s", api.StatusReasonMethodNotAllowed)
|
||||
@@ -68,8 +68,8 @@ func TestErrorNew(t *testing.T) {
|
||||
if !IsForbidden(NewForbidden("test", "2", errors.New("reason"))) {
|
||||
t.Errorf("expected to be %s", api.StatusReasonForbidden)
|
||||
}
|
||||
if !IsTryAgainLater(NewTryAgainLater("test", "reason")) {
|
||||
t.Errorf("expected to be %s", api.StatusReasonTryAgainLater)
|
||||
if !IsServerTimeout(NewServerTimeout("test", "reason")) {
|
||||
t.Errorf("expected to be %s", api.StatusReasonServerTimeout)
|
||||
}
|
||||
if !IsMethodNotSupported(NewMethodNotSupported("foo", "delete")) {
|
||||
t.Errorf("expected to be %s", api.StatusReasonMethodNotAllowed)
|
||||
|
Reference in New Issue
Block a user