Skip to content

Commit

Permalink
fix potential panic condition in remote provider requests
Browse files Browse the repository at this point in the history
Signed-off-by: MUzairS15 <[email protected]>
  • Loading branch information
MUzairS15 committed Jun 10, 2024
1 parent a7075a4 commit 5c8cc43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/models/remote_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1239,8 +1239,8 @@ func (l *RemoteProvider) PublishEventToProvider(tokenString string, event events
}

if resp.StatusCode != http.StatusOK {
l.Log.Error(ErrPost(err, "event", resp.StatusCode))
return ErrPost(err, "event", resp.StatusCode)
l.Log.Error(ErrPost(fmt.Errorf("error persisting event with the remote provider"), "event", resp.StatusCode))
return ErrPost(fmt.Errorf("error persisting event with the remote provider"), "event", resp.StatusCode)
}
return nil
}
Expand Down

0 comments on commit 5c8cc43

Please sign in to comment.