Skip to content

Commit fe4e325

Browse files
Merge pull request #11 from jprodrigues70/master
Add bot IP to CheckIfBotIsReal error throw
2 parents 738b8a2 + 94d93fc commit fe4e325

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Jobs/CheckIfBotIsReal.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public function handle()
4949
}
5050

5151
if (is_null($found_bot_key)) {
52-
throw new \InvalidArgumentException("I did not found \"{$this->client->userAgent}\" key");
52+
$ip = !empty($this->client) && !empty($this->client->ip) ? ", IP: {$this->client->ip}." : ". The IP was not recovered.";
53+
54+
throw new \InvalidArgumentException("I did not found \"{$this->client->userAgent}\" key{$ip}");
5355
}
5456

5557
// Lets remove from the pending list

0 commit comments

Comments
 (0)