diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e354bd..5dca72c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# v0.2.0 (Sep 2023) + +## Additions + +- Add `NotUnique` and `InvalidKeyType` variants to `ErrorCode` enum. + +## Changes + +- Rename `UsageExceeded` error code to `KeyUsageExceeded`. + # v0.1.0 (Aug 2023) ## Additions diff --git a/Cargo.toml b/Cargo.toml index d61f8e5..4b80fe0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "unkey" description = "An asynchronous Rust SDK for the Unkey API." -version = "0.1.0" +version = "0.2.0" edition = "2021" authors = ["Jonxslays"] readme = "README.md" diff --git a/src/models/http.rs b/src/models/http.rs index fb5c1d5..2203e81 100644 --- a/src/models/http.rs +++ b/src/models/http.rs @@ -22,12 +22,18 @@ pub enum ErrorCode { /// Not authorized for resource. Unauthorized, - /// You have exceeded your usage. - UsageExceeded, + /// The key has exceeded its usage. + KeyUsageExceeded, /// An internal server error occurred with the api. InternalServerError, + // An invalid key type was used (shouldn't happen usually). + InvalidKeyType, + + // The identifier is in use by another resource. + NotUnique, + /// Reserved for unknown interactions. #[serde(other)] Unknown,