Merge pull request #140 from arvinnick/issue-138

caught the json exception and imitated another error which was above it
This commit is contained in:
Alexander Myasoedov
2025-02-25 12:32:06 +02:00
committed by GitHub
+5
View File
@@ -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(