Skip to content

checkpoint_harmony_endpoint: improve handling of API errors #13333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

chemamartinez
Copy link
Contributor

Proposed commit message

The two changes included are:
- The handling of the 404 error when hitting the retrieve endpoint (that happens when the integration already received a valid task ID and page token, in this case, both parameters are cleaned and a new task ID is requested again for the same timeframe.
- In the generic error handling, also clean task ID and page token to avoid entering in a loop making requests with stale parameters.

Note

All data streams have identical cel.yml.hbs files.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

@chemamartinez chemamartinez added enhancement New feature or request Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Integration:checkpoint_harmony_endpoint Check Point Harmony Endpoint labels Mar 27, 2025
@chemamartinez chemamartinez self-assigned this Mar 27, 2025
@chemamartinez chemamartinez marked this pull request as ready for review March 27, 2025 16:00
@chemamartinez chemamartinez requested a review from a team as a code owner March 27, 2025 16:00
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Copy link
Contributor

@chrisberkhout chrisberkhout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 404 changes look good.

For the generic error handling changes, is it intentional that the time advances? It seems like it should also repeat.

@chemamartinez
Copy link
Contributor Author

The 404 changes look good.

For the generic error handling changes, is it intentional that the time advances? It seems like it should also repeat.

@chrisberkhout, yes, that makes sense I think. I've trying to get some troubleshooting advices from the API docs but unfortunately there's nothing there.

Do you think it would be worthy to merge both 404 and generic cases by setting want_more: false in 404 case? that would simplify the error logic.

@chrisberkhout
Copy link
Contributor

Do you think it would be worthy to merge both 404 and generic cases by setting want_more: false in 404 case? that would simplify the error logic.

Yes, good idea!

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @chemamartinez

Copy link

@chemamartinez chemamartinez merged commit 787d896 into elastic:main Mar 28, 2025
7 checks passed
@chemamartinez chemamartinez deleted the checkpoint_harmony_endpoint-error-handling branch March 28, 2025 10:58
@elastic-vault-github-plugin-prod

Package checkpoint_harmony_endpoint - 0.6.0 containing this change is available at https://epr.elastic.co/package/checkpoint_harmony_endpoint/0.6.0/

flexitrev pushed a commit that referenced this pull request Mar 28, 2025
In the generic error handling (including 404 error), clear task ID and page token if any, and reset the sequence for the same timeframe, to avoid getting stuck making requests with stale parameters.
flexitrev pushed a commit that referenced this pull request Mar 28, 2025
In the generic error handling (including 404 error), clear task ID and page token if any, and reset the sequence for the same timeframe, to avoid getting stuck making requests with stale parameters.
flexitrev pushed a commit that referenced this pull request Mar 28, 2025
In the generic error handling (including 404 error), clear task ID and page token if any, and reset the sequence for the same timeframe, to avoid getting stuck making requests with stale parameters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:checkpoint_harmony_endpoint Check Point Harmony Endpoint Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants