mirror of
https://github.com/anotherhadi/gravatar-recon.git
synced 2026-10-05 19:28:25 +02:00
return an empty list instead of an error if no result
Signed-off-by: Hadi <[email protected]>
This commit is contained in:
@@ -91,6 +91,10 @@ func GetGravatarProfiles(email string) (*[]GravatarProfile, error) {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode == 404 {
|
||||
return &[]GravatarProfile{}, nil
|
||||
}
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return nil, fmt.Errorf("no gravatar profile found (status %d)", resp.StatusCode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user