@@ -42,14 +42,14 @@ func (p *Processor) handleAlerts(c *gin.Context) {
4242 }
4343
4444 if ! configurations .GetGPTConfig ().ModuleActive {
45- catcher .Error ("Droping request to /process, GPT module is not active" , nil , map [ string ] any {} )
45+ catcher .Error ("Droping request to /process, GPT module is not active" , nil , nil )
4646 c .JSON (http .StatusOK , "GPT module is not active" )
4747 return
4848 }
4949
5050 var ids []string
5151 if err := c .BindJSON (& ids ); err != nil {
52- catcher .Error ("error binding JSON" , err , map [ string ] any {} )
52+ catcher .Error ("error binding JSON" , err , nil )
5353 c .JSON (http .StatusBadRequest , gin.H {"error" : err .Error ()})
5454 return
5555 }
@@ -69,22 +69,22 @@ func (p *Processor) handleAlerts(c *gin.Context) {
6969 var gptResponses []schema.GPTAlertResponse
7070 err = json .Unmarshal (result , & gptResponses )
7171 if err != nil {
72- catcher .Error ("error decoding response from elastic" , err , map [ string ] any {} )
72+ catcher .Error ("error decoding response from elastic" , err , nil )
7373 c .JSON (http .StatusInternalServerError , fmt .Sprintf ("error decoding response: %v" , err ))
7474 return
7575 }
7676
7777 if len (gptResponses ) == 0 {
7878 err = elastic .IndexStatus (id , "Processing" , "create" )
7979 if err != nil {
80- catcher .Error ("error creating doc in index" , err , map [ string ] any {} )
80+ catcher .Error ("error creating doc in index" , err , nil )
8181 c .JSON (http .StatusInternalServerError , fmt .Sprintf ("error creating doc in index: %v" , err ))
8282 return
8383 }
8484 } else {
8585 err = elastic .IndexStatus (id , "Processing" , "update" )
8686 if err != nil {
87- catcher .Error ("error updating doc in index" , err , map [ string ] any {} )
87+ catcher .Error ("error updating doc in index" , err , nil )
8888 c .JSON (http .StatusInternalServerError , fmt .Sprintf ("error updating doc in index: %v" , err ))
8989 return
9090 }
0 commit comments