Skip to content

Commit

Permalink
added error handling for empty api key and secret
Browse files Browse the repository at this point in the history
  • Loading branch information
infinityofspace committed Aug 19, 2024
1 parent 8230b55 commit ec3d1c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkb_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def _get_auth_request_json(self) -> dict:
:return: the request json for the authentication of the Porkbun API calls
"""

if self.api_key is None or self.secret_api_key is None:
raise ValueError("api_key and secret_api_key must be set")

return {
"apikey": self.api_key,
"secretapikey": self.secret_api_key
Expand Down

0 comments on commit ec3d1c4

Please sign in to comment.