File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ func LoadEnv() {
3737// ReadConfigFile should initialize once jsonConfig
3838func ReadConfigFile () {
3939 // logger should stop execution if there is no file found
40- e , err := ioutil .ReadFile ("config/" + os .Getenv ("CONFIG_FILE" ))
40+ e , err := ioutil .ReadFile (os .Getenv ("CONFIG_FILE" ))
4141 logger .Error (err , "Config file not found" )
4242
4343 err = json .Unmarshal (e , & jsonConfig )
44- logger .Fatal (err , "Unable to parse config.json" )
44+ logger .Fatal (err , "Unable to parse " + os . Getenv ( "CONFIG_FILE" ) )
4545
4646}
4747
@@ -68,13 +68,12 @@ func isValidHeader(r *http.Response) bool {
6868
6969func modifyResponse (r * http.Response ) error {
7070 if ! isValidHeader (r ) {
71- err := errors .New ("Unexpected Content-Type" )
72- logger .Error (err )
73- return err
71+ return nil
7472 }
73+
7574 html , err := ioutil .ReadAll (r .Body )
7675 if err != nil {
77- logger .Error (err , "Body was not provided " )
76+ logger .Error (err , "Malformed HTML in Content Body " )
7877 return err
7978 }
8079
You can’t perform that action at this time.
0 commit comments