@@ -48,17 +48,17 @@ func (p *SophosCentralProcessor) getAccessToken() (string, error) {
4848
4949 response , _ , err := utils .DoReq [map [string ]any ](configuration .AUTHURL , []byte (data .Encode ()), http .MethodPost , headers )
5050 if err != nil {
51- return "" , catcher .Error ("error making auth request" , err , map [ string ] any {} )
51+ return "" , catcher .Error ("error making auth request" , err , nil )
5252 }
5353
5454 accessToken , ok := response ["access_token" ].(string )
5555 if ! ok || accessToken == "" {
56- return "" , catcher .Error ("access_token not found in response" , nil , map [ string ] any {} )
56+ return "" , catcher .Error ("access_token not found in response" , nil , nil )
5757 }
5858
5959 expiresIn , ok := response ["expires_in" ].(float64 )
6060 if ! ok {
61- return "" , catcher .Error ("expires_in not found in response" , nil , map [ string ] any {} )
61+ return "" , catcher .Error ("expires_in not found in response" , nil , nil )
6262 }
6363
6464 p .AccessToken = accessToken
@@ -84,16 +84,16 @@ func (p *SophosCentralProcessor) getTenantInfo(accessToken string) error {
8484
8585 response , _ , err := utils .DoReq [WhoamiResponse ](configuration .WHOAMIURL , nil , http .MethodGet , headers )
8686 if err != nil {
87- return catcher .Error ("error making whoami request" , err , map [ string ] any {} )
87+ return catcher .Error ("error making whoami request" , err , nil )
8888 }
8989
9090 if response .ID == "" {
91- return catcher .Error ("tenant ID not found in whoami response" , nil , map [ string ] any {} )
91+ return catcher .Error ("tenant ID not found in whoami response" , nil , nil )
9292 }
9393 p .TenantID = response .ID
9494
9595 if response .ApiHosts .DataRegion == "" {
96- return catcher .Error ("dataRegion not found in whoami response" , nil , map [ string ] any {} )
96+ return catcher .Error ("dataRegion not found in whoami response" , nil , nil )
9797 }
9898 p .DataRegion = response .ApiHosts .DataRegion
9999
@@ -122,12 +122,12 @@ type Pages struct {
122122func (p * SophosCentralProcessor ) getLogs (fromTime int64 , nextKey string , group types.ModuleGroup ) ([]TransformedLog , string , error ) {
123123 accessToken , err := p .getValidAccessToken ()
124124 if err != nil {
125- return nil , "" , catcher .Error ("error getting access token" , err , map [ string ] any {} )
125+ return nil , "" , catcher .Error ("error getting access token" , err , nil )
126126 }
127127
128128 if p .TenantID == "" || p .DataRegion == "" {
129129 if err := p .getTenantInfo (accessToken ); err != nil {
130- return nil , "" , catcher .Error ("error getting tenant information" , err , map [ string ] any {} )
130+ return nil , "" , catcher .Error ("error getting tenant information" , err , nil )
131131 }
132132 }
133133
@@ -138,7 +138,7 @@ func (p *SophosCentralProcessor) getLogs(fromTime int64, nextKey string, group t
138138 for {
139139 u , err := p .buildURL (fromTime , currentNextKey )
140140 if err != nil {
141- return nil , "" , catcher .Error ("error building URL" , err , map [ string ] any {} )
141+ return nil , "" , catcher .Error ("error building URL" , err , nil )
142142 }
143143
144144 headers := map [string ]string {
0 commit comments