diff options
| author | Mason Reed <mason@vector35.com> | 2025-02-07 00:03:46 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-02-07 00:03:46 -0500 |
| commit | 14f0481066ade931baf9791626b2cda165c0f4f2 (patch) | |
| tree | dfd84f70aa8aed7a5badb2d2323694cec4dc5d22 /rust/src/enterprise.rs | |
| parent | ce77933297d0e1a9a89c7eab7b8fdd39eb5712e1 (diff) | |
Add server error to EnterpriseCheckoutError::RefreshExpiredLicenseFailed
Diffstat (limited to 'rust/src/enterprise.rs')
| -rw-r--r-- | rust/src/enterprise.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rust/src/enterprise.rs b/rust/src/enterprise.rs index 6a4088dc..ad682aad 100644 --- a/rust/src/enterprise.rs +++ b/rust/src/enterprise.rs @@ -15,8 +15,8 @@ pub enum EnterpriseCheckoutError { NoPassword, #[error("failed to authenticate with username and password")] NotAuthenticated, - #[error("failed to refresh expired license")] - RefreshExpiredLicenseFailed, + #[error("failed to refresh expired license: {0}")] + RefreshExpiredLicenseFailed(String), } /// Initialize the enterprise server connection to check out a floating license. @@ -67,7 +67,10 @@ pub fn checkout_license(duration: Duration) -> Result<(), EnterpriseCheckoutErro { // If the license is expired we should refresh the license. if !update_server_license(duration) { - return Err(EnterpriseCheckoutError::RefreshExpiredLicenseFailed); + let last_error = server_last_error().to_string(); + return Err(EnterpriseCheckoutError::RefreshExpiredLicenseFailed( + last_error, + )); } } |
