Skip to content
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

Check API errors when getting fields quota in setup job #1524

Merged

Conversation

pmalek-sumo
Copy link
Contributor

Description

Whenever a user encounters an error that is received from Sumo Logic API it's somehow lost.

This PR addresses that by explicitly checking for expected .remaining key in the returned JSON and it explicitly logs the received JSON whenever an error occurs.

Fixes: #1523

Copy link
Contributor

@perk-sumo perk-sumo left a comment

Choose a reason for hiding this comment

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

I'm 👍 except for the get_remaining_fields function name problem.

@perk-sumo perk-sumo self-requested a review March 24, 2021 15:37
@pmalek-sumo pmalek-sumo force-pushed the setup-job-check-errors-when-getting-fields-quota-from-api branch from 19cba50 to 3348423 Compare March 24, 2021 15:38
@pmalek-sumo pmalek-sumo merged commit 1ab8691 into main Mar 24, 2021
@pmalek-sumo pmalek-sumo deleted the setup-job-check-errors-when-getting-fields-quota-from-api branch March 24, 2021 15:41
Copy link
Contributor

@perk-sumo perk-sumo left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explicitly check the error received via curl when checking for fields quota
3 participants