Spaces:
Building
Building
Upload 4 files
Browse files
app.py
CHANGED
@@ -347,7 +347,7 @@ def handle_api_error(error, attempt):
|
|
347 |
switch_api_key()
|
348 |
return 0, None
|
349 |
|
350 |
-
elif isinstance(error,
|
351 |
try:
|
352 |
full_reason_str = str(error.args[0])
|
353 |
logger.error(f"{full_reason_str}")
|
|
|
347 |
switch_api_key()
|
348 |
return 0, None
|
349 |
|
350 |
+
elif isinstance(error, BlockedPromptException):
|
351 |
try:
|
352 |
full_reason_str = str(error.args[0])
|
353 |
logger.error(f"{full_reason_str}")
|