LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
Show error message when user try to add profile with existing name (#195)
Siddhiq00c69aaf9d95
diff --git a/backend/prompt_studio/prompt_profile_manager/constants.py b/backend/prompt_studio/prompt_profile_manager/constants.pyindex f474100bb..70cf34019 100644--- a/backend/prompt_studio/prompt_profile_manager/constants.py+++ b/backend/prompt_studio/prompt_profile_manager/constants.py@@ -11,6 +11,6 @@ class ProfileManagerKeys:class ProfileManagerErrors:SERIALIZATION_FAILED = "Data Serialization Failed."- PROFILE_NAME_EXISTS = "Profile with the name already exists"+ PROFILE_NAME_EXISTS = "A profile with this name already exists."DUPLICATE_API = "It appears that a duplicate call may have been made."PLATFORM_ERROR = "Seems an error occured in Platform Service."diff --git a/backend/prompt_studio/prompt_profile_manager/views.py b/backend/prompt_studio/prompt_profile_manager/views.pyindex e6a8159bd..3ffbec51d 100644--- a/backend/prompt_studio/prompt_profile_manager/views.py+++ b/backend/prompt_studio/prompt_profile_manager/views.py@@ -54,8 +54,5 @@ class ProfileManagerView(viewsets.ModelViewSet):try:self.perform_create(serializer)except IntegrityError:- raise DuplicateData(- f"{ProfileManagerErrors.PROFILE_NAME_EXISTS}, \- {ProfileManagerErrors.DUPLICATE_API}"- )+ raise DuplicateData(ProfileManagerErrors.PROFILE_NAME_EXISTS)return Response(serializer.data, status=status.HTTP_201_CREATED)diff --git a/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsx b/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsxindex 72f9612ed..ff6539f09 100644--- a/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsx+++ b/frontend/src/components/custom-tools/add-llm-profile/AddLlmProfile.jsx@@ -334,7 +334,7 @@ function AddLlmProfile({setIsAddLlm(false);}).catch((err) => {- handleException(err, "", setBackendErrors);+ setAlertDetails(handleException(err, "", setBackendErrors));}).finally(() => {setLoading(false);