Skip to content

Commit

Permalink
Update error codes to match changes in the unkey API (#5)
Browse files Browse the repository at this point in the history
* Update error code enum

* Bump project version

* Update changelog
  • Loading branch information
Jonxslays authored Sep 18, 2023
1 parent e0d0102 commit 8d67d3c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v0.4.3 (Sep 2023)

### Additions

- Add `NotUnique` and `InvalidKeyType` variants to `ErrorCode`.

### Changes

- Rename `UsageExceeded` error code to `KeyUsageExceeded`.

## v0.4.2 (Aug 2023)

### Additions
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "unkey.py"
version = "0.4.2"
version = "0.4.3"
description = "An asynchronous Python SDK for unkey.dev."
authors = ["Jonxslays"]
license = "GPL-3.0-only"
Expand Down
2 changes: 1 addition & 1 deletion unkey/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Final

__packagename__: Final[str] = "unkey.py"
__version__: Final[str] = "0.4.2"
__version__: Final[str] = "0.4.3"
__author__: Final[str] = "Jonxslays"
__copyright__: Final[str] = "2023-present Jonxslays"
__description__: Final[str] = "An asynchronous Python SDK for unkey.dev."
Expand Down
4 changes: 3 additions & 1 deletion unkey/models/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class ErrorCode(BaseEnum):
InternalServerError = "INTERNAL_SERVER_ERROR"
Ratelimited = "RATELIMITED"
Forbidden = "FORBIDDEN"
UsageExceeded = "USAGE_EXCEEDED"
KeyUsageExceeded = "KEY_USAGE_EXCEEDED"
InvalidKeyType = "INVALID_KEY_TYPE"
NotUnique = "NOT_UNIQUE"
Unknown = "UNKNOWN"


Expand Down

0 comments on commit 8d67d3c

Please sign in to comment.