mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-06-24 06:09:55 +02:00
caught the json exception and imitated another error which was above it
This commit is contained in:
@@ -2,6 +2,7 @@ import asyncio
|
||||
import random
|
||||
import time
|
||||
from collections.abc import AsyncGenerator
|
||||
from json import JSONDecodeError
|
||||
|
||||
import httpx
|
||||
import pandas as pd
|
||||
@@ -75,6 +76,10 @@ async def process_prompt(
|
||||
logger.error(f"Request error: {exc}")
|
||||
errors.append((module_name, prompt, "?", str(exc)))
|
||||
return tokens, True
|
||||
except JSONDecodeError as json_decode_error:
|
||||
logger.error(f"Jason error: {json_decode_error}")
|
||||
errors.append((module_name, prompt, "?", str(json_decode_error)))
|
||||
return tokens, True
|
||||
|
||||
|
||||
async def perform_single_shot_scan(
|
||||
|
||||
Reference in New Issue
Block a user