feat(report): add a err code to wpscan.com API error (#1119)

This commit is contained in:
Kota Kanbe
2021-01-07 14:57:49 +09:00
committed by GitHub
parent d7a613b710
commit 69d32d4511
5 changed files with 11 additions and 8 deletions

View File

@@ -65,10 +65,8 @@ func FillGitHubSecurityAlerts(r *models.ScanResult, owner, repo, token string) (
// util.Log.Debugf("%s", pp.Sprint(alerts))
// util.Log.Debugf("%s", string(body))
if alerts.Data.Repository.URL == "" {
return 0, errof.New(
errof.ErrFailedToAccessGithubAPI,
fmt.Sprintf("Failed to access to GitHub API. Response: %s", string(body)),
)
return 0, errof.New(errof.ErrFailedToAccessGithubAPI,
fmt.Sprintf("Failed to access to GitHub API. Response: %s", string(body)))
}
for _, v := range alerts.Data.Repository.VulnerabilityAlerts.Edges {