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

Improve error messages #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Improve error messages #4

wants to merge 2 commits into from

Conversation

sanosom
Copy link
Member

@sanosom sanosom commented Jan 6, 2021

  • Fix python 3.6+ issues
    Upper version from python 3.6 requires to compare using == or !=
    when comparing againts literal strings or numbers, it also requires
    to use the work as on exceptions, and use the parenthesis when
    calling the method print. This also fixes the tests to be case
    sensitive when using unix/linux.

  • Improve error messages
    Currently we are raising a HTTPError using the method raise_for_status
    from the Requests library, this doesn't takes the information
    returned from the API with the explaination of why the API could
    not create the file, instead we are parsing the response from the
    API and raising an Exception with the error.

Fixes #3

Upper version from python 3.6 requires to compare using `==` or `!=`
when comparing againts literal strings or numbers, it also requires
to use the work `as` on exceptions, and use the parenthesis when
calling the method `print`. This also fixes the tests to be case
sensitive when using unix/linux.
Currently we are raising a HTTPError using the method `raise_for_status`
from the `Requests` library, this doesn't takes the information
returned from the API with the explaination of why the API could
not create the file, instead we are parsing the response from the
API and raising an `Exception` with the error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

python 3.8
1 participant