Skip to content

Commit

Permalink
Clean up error output
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Jul 10, 2017
1 parent 09cd2a0 commit d2caf65
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions csp_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"encoding/json"
"errors"
"fmt"
"log"
"net/http"
Expand Down Expand Up @@ -86,7 +85,7 @@ func validateViolation(r CSPReport) error {

for _, value := range ignoredBlockedURIs {
if strings.HasPrefix(r.Body.BlockedURI, value) == true {
err := errors.New(fmt.Sprintf("Blocked URI ('%s') is an invalid resource.", value))
err := fmt.Errorf("Blocked URI ('%s') is an invalid resource.", value)
return err
}
}
Expand Down

0 comments on commit d2caf65

Please sign in to comment.