-
Notifications
You must be signed in to change notification settings - Fork 4
chore sdk #54
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
base: master
Are you sure you want to change the base?
chore sdk #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these examples for? Are they to display what exceptions can be raised? If so, we can do the following instead:
import staxapp.exceptions
for key, value in sorted(staxapp.exceptions.__dict__.items()):
if isinstance(value, type):
print(key)
Which returns this:
ApiException
InvalidCredentialsException
JSONDecodeError
ValidationException
Can we please keep them as they are? I like that it's clear an explicit as to the error types that are available, and that are being caught in each example. |
examples/exceptions/api_exception.py
Outdated
except ApiException as e: | ||
print(e) | ||
if e.status_code == 404: | ||
print("No accounts exist") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "No accounts exist" the right text here?
Seems strange to get that back from a ReadCatalogueItems()
call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done this change
43c3c6b
to
12c2ad7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧮 💵
12c2ad7
to
8be714b
Compare
Codecov Report
@@ Coverage Diff @@
## master #54 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 323 323
=========================================
Hits 323 323 |
Add Examples for each of the exceptions
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)