Commit ed345b72 authored by Mike Jones's avatar Mike Jones 馃尪
Browse files

Censor error messages containing the API key

parent dc007e2f
......@@ -3,6 +3,7 @@ package command
import (
......@@ -32,6 +33,11 @@ type Fn struct {
// error, but just don't include the information they should've sent (or set it
// as unknown).
func fmtError(err error) string {
if strings.Contains("api_key", err.Error()) {
// Sneaky error with API key in it, return generic response
return "There was a problem contacting"
return fmt.Sprintf("Error: %s", err.Error())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment