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

Only decode and return browser content in the successful case #162

Closed
wants to merge 1 commit into from

Conversation

kalikiana
Copy link
Member

openqa_review/browser.py Outdated Show resolved Hide resolved
@Martchus
Copy link
Contributor

Looks like this is related to #159

return content
except json.decoder.JSONDecodeError as e:
msg = "Failed to decode {}: {}".format(r.content, str(e))
log.warn(msg)
Copy link
Member

Choose a reason for hiding this comment

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

Before we escalate the message with "warning" level I would like to understand what can be the reason for such cases encountered. Should we ignore such issues? Then make it less than "warn". Should we handle such issues? Then "warn" is not high enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know the reason. All i know is that we get invalid JSON, which I'm surfacing here, that the traceback doesn't contain. And I'd consider that an error.

Copy link
Member

Choose a reason for hiding this comment

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

It would be nice if the URL could be included in the error message.

@okurz
Copy link
Member

okurz commented Jun 30, 2021

hm, I wonder if the coverage check should not fail here. Could you please check why https://travis-ci.com/github/os-autoinst/openqa_review/jobs/519750936#L214 says 75% and not 100%? We should fail CI checks if the coverage is not ensured to be 100%

@kalikiana
Copy link
Member Author

I'm closing this since the only case where this was reproduced is one where the HTTP error was not caught.

@kalikiana kalikiana closed this Jul 6, 2021
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.

None yet

4 participants