Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix: handle bad requests during job creation #7

Conversation

NorbertRadvilovic
Copy link

At the moment, if user provides invalid data that isn't caught during request validation, then SDK client will hang until timeout is reached.
Since API returns 202 Accepted, status code should be checked when trying to GetJobID().

These changes check response status code. In case of an error, response body is included in the error so the user knows what was the issue.

@NorbertRadvilovic NorbertRadvilovic force-pushed the fix/handle-bad-requests-during-job-creation branch from 49cf50c to 2f5b771 Compare February 27, 2024 12:12
@NorbertRadvilovic NorbertRadvilovic force-pushed the fix/handle-bad-requests-during-job-creation branch from 2f5b771 to e49334c Compare February 27, 2024 12:35
@UmanShahzad UmanShahzad merged commit c4b88bb into oxylabs:master Feb 27, 2024
@NorbertRadvilovic NorbertRadvilovic deleted the fix/handle-bad-requests-during-job-creation branch February 28, 2024 09:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants