Skip to content

Commit 21c5a12

Browse files
committed
feat: improve error message for missing authentication
feat: improve error message for missing authentication
1 parent 01fa3f4 commit 21c5a12

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/increase/_client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ def qs(self) -> Querystring:
181181
return Querystring(nested_format="dots", array_format="comma")
182182

183183
@property
184-
def auth_headers(self) -> Dict[str, str]:
185-
return {"Authorization": f"Bearer {self.api_key}"}
184+
def auth_headers(self) -> dict[str, str]:
185+
api_key = self.api_key
186+
return {"Authorization": f"Bearer {api_key}"}
186187

187188
def copy(
188189
self,
@@ -441,8 +442,9 @@ def qs(self) -> Querystring:
441442
return Querystring(nested_format="dots", array_format="comma")
442443

443444
@property
444-
def auth_headers(self) -> Dict[str, str]:
445-
return {"Authorization": f"Bearer {self.api_key}"}
445+
def auth_headers(self) -> dict[str, str]:
446+
api_key = self.api_key
447+
return {"Authorization": f"Bearer {api_key}"}
446448

447449
def copy(
448450
self,

0 commit comments

Comments
 (0)