Skip to content

Commit

Permalink
Support more cases of GoDaddy rate limiting.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfycheng committed Nov 6, 2024
1 parent 95f6cb3 commit 85e14ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func isLimitExceeded(data string) bool {
"you have exceeded your allotted number of",
"maximum daily connection limit reached",
"maximum query rate reached",
"number of allowed queries exceeded",
}

return containsIn(strings.ToLower(data), limitExceedKeys)
Expand Down
4 changes: 4 additions & 0 deletions error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,8 @@ func TestAsisLimitExceeded(t *testing.T) {

data = `%% Maximum query rate reached`
assert.True(t, isLimitExceeded(data))

// GoDaddy (when blocking all queries)
data = "Number of allowed queries exceeded\r\n"
assert.True(t, isLimitExceeded(data))
}

0 comments on commit 85e14ab

Please sign in to comment.