Skip to content

Commit

Permalink
Replace error message variables
Browse files Browse the repository at this point in the history
* It is more usefull to have the user input value in the error message
  • Loading branch information
Golit committed Aug 29, 2020
1 parent ee77e97 commit eb88b8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rest-api/request_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ func BuildWebserviceResponseFromRequest(r *http.Request, appConfig *Config, extr

if len(response.Addresses) == 0 {
response.Success = false
response.Message = fmt.Sprintf("%v is neither a valid IPv4 nor IPv6 address", response.Addresses)
log.Println(fmt.Sprintf("Invalid address: %v", response.Addresses))
response.Message = fmt.Sprintf("%v is neither a valid IPv4 nor IPv6 address", extractors.Address(r))
log.Println(fmt.Sprintf("Invalid address: %v", extractors.Address(r)))
return response
}

Expand Down

0 comments on commit eb88b8b

Please sign in to comment.