Skip to content

Commit

Permalink
removed logger
Browse files Browse the repository at this point in the history
  • Loading branch information
jagadeeswaran-zipstack committed Jul 17, 2024
1 parent 2c4b8a8 commit a620701
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions backend/prompt_studio/prompt_studio_output_manager/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
PromptStudioOutputSerializer,
)
from rest_framework import status, viewsets
from rest_framework.exceptions import APIException, ValidationError
from rest_framework.exceptions import APIException
from rest_framework.response import Response
from rest_framework.versioning import URLPathVersioning
from utils.common_utils import CommonUtils
Expand Down Expand Up @@ -63,14 +63,13 @@ def get_output_for_tool_default(self, request: HttpRequest) -> Response:
document_manager_id = request.GET.get("document_manager")
tool_validation_message = PromptOutputManagerErrorMessage.TOOL_VALIDATION
if not tool_id:
logger.error(f"Validation error: {tool_validation_message}")
raise ValidationError(detail=f"Validation error: {tool_validation_message}")
raise APIException(detail=tool_validation_message, code=404)

try:
# Fetch ToolStudioPrompt records based on tool_id
tool_studio_prompts = ToolStudioPrompt.objects.filter(tool_id=tool_id)
except Exception as e:
raise APIException(detail=e, code=400)
except ObjectDoesNotExist:
raise APIException(detail=tool_validation_message, code=404)

# Initialize the result dictionary
result: dict[str, Any] = {}
Expand Down

0 comments on commit a620701

Please sign in to comment.