Adds an AuthMissingError exception type that the client raises when any auth vars are missing.
We then catch this in the CLI and present a useful error to the user:
incydr users list
ERROR: Missing authentication variables in environment.
- INCYDR_API_CLIENT_SECRET
- INCYDR_URL
See https://developer.code42.com/cli/getting_started/#authentication
This PR also exposes the _incydr_sdk.exceptions module at incydr.exceptions, making it easier for users to catch our custom exceptions.
It also moves our internal custom error logging methods from the incydr.Client object to the IncydrSettings object, so it's easier to log without having to instantiate a Client.
Adds an
AuthMissingError
exception type that the client raises when any auth vars are missing.We then catch this in the CLI and present a useful error to the user:
This PR also exposes the
_incydr_sdk.exceptions
module atincydr.exceptions
, making it easier for users to catch our custom exceptions.It also moves our internal custom error logging methods from the
incydr.Client
object to theIncydrSettings
object, so it's easier to log without having to instantiate aClient
.