What's Changed
Breaking changes
Now exceptions will have error data in them. Eg:
try:
testuser = logged_rocket.users_info(username="testuser1")
except RocketApiException as e:
if e.error == "User not found":
testuser = logged_rocket.users_create(
"testuser1@domain.com", "testuser1", "password", "testuser1"
)
else:
raise eor
try:
logged_rocket.channels_leave("GENERAL")
except RocketApiException as e:
if e.error_type == "error-you-are-last-owner":
print("Not allowed to leave cause you are the last owner")Also now RocketBadStatusCodeException triggers only when the API does not return valid data (maybe reverse proxy error or similar). RocketApiException is now the way to check for common API errors.
Github Actions
- Protect github actions inputs by @jadolg in #340
- Potential fix for code scanning alert no. 3: Workflow does not contain permissions by @jadolg in #341
- Potential fix for code scanning alert no. 5: Workflow does not contain permissions by @jadolg in #342
- Potential fix for code scanning alert no. 4: Workflow does not contain permissions by @jadolg in #343
- Potential fix for code scanning alert no. 7: Workflow does not contain permissions by @jadolg in #344
Full Changelog: 2.1.0...3.0.0