diff --git a/admin/services/index.ts b/admin/services/index.ts
deleted file mode 100644
index 57313a87f..000000000
--- a/admin/services/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from "./auth.service";
-export * from "./instance.service";
-export * from "./user.service";
diff --git a/admin/services/instance.service.ts b/admin/services/instance.service.ts
index e995ee821..13431a834 100644
--- a/admin/services/instance.service.ts
+++ b/admin/services/instance.service.ts
@@ -13,8 +13,7 @@ export class InstanceService extends APIService {
return this.get("/api/instances/")
.then((response) => response.data)
.catch((error) => {
- console.log("error", error);
- throw error;
+ throw error?.response?.data;
});
}
diff --git a/admin/store/user.store.ts b/admin/store/user.store.ts
index 271c6be34..60638f0cd 100644
--- a/admin/store/user.store.ts
+++ b/admin/store/user.store.ts
@@ -3,7 +3,7 @@ import { IUser } from "@plane/types";
// helpers
import { EUserStatus, TUserStatus } from "@/helpers";
// services
-import { AuthService } from "@/services";
+import { AuthService } from "@/services/auth.service";
import { UserService } from "@/services/user.service";
// root store
import { RootStore } from "@/store/root.store";
diff --git a/apiserver/plane/license/utils/encryption.py b/apiserver/plane/license/utils/encryption.py
index 11bd9000e..6781605dd 100644
--- a/apiserver/plane/license/utils/encryption.py
+++ b/apiserver/plane/license/utils/encryption.py
@@ -3,6 +3,8 @@ import hashlib
from django.conf import settings
from cryptography.fernet import Fernet
+from plane.utils.exception_logger import log_exception
+
def derive_key(secret_key):
# Use a key derivation function to get a suitable encryption key
@@ -12,21 +14,29 @@ def derive_key(secret_key):
# Encrypt data
def encrypt_data(data):
- if data:
- cipher_suite = Fernet(derive_key(settings.SECRET_KEY))
- encrypted_data = cipher_suite.encrypt(data.encode())
- return encrypted_data.decode() # Convert bytes to string
- else:
+ try:
+ if data:
+ cipher_suite = Fernet(derive_key(settings.SECRET_KEY))
+ encrypted_data = cipher_suite.encrypt(data.encode())
+ return encrypted_data.decode() # Convert bytes to string
+ else:
+ return ""
+ except Exception as e:
+ log_exception(e)
return ""
# Decrypt data
def decrypt_data(encrypted_data):
- if encrypted_data:
- cipher_suite = Fernet(derive_key(settings.SECRET_KEY))
- decrypted_data = cipher_suite.decrypt(
- encrypted_data.encode()
- ) # Convert string back to bytes
- return decrypted_data.decode()
- else:
+ try:
+ if encrypted_data:
+ cipher_suite = Fernet(derive_key(settings.SECRET_KEY))
+ decrypted_data = cipher_suite.decrypt(
+ encrypted_data.encode()
+ ) # Convert string back to bytes
+ return decrypted_data.decode()
+ else:
+ return ""
+ except Exception as e:
+ log_exception(e)
return ""