Spaces:
Paused
Paused
Upload 4 files
Browse files
app.py
CHANGED
|
@@ -236,7 +236,7 @@ def handle_api_error(error, attempt):
|
|
| 236 |
elif isinstance(error, generation_types.BlockedPromptException):
|
| 237 |
try:
|
| 238 |
full_reason_str = str(error.args[0])
|
| 239 |
-
|
| 240 |
if "block_reason:" in full_reason_str:
|
| 241 |
start_index = full_reason_str.find("block_reason:") + len("block_reason:")
|
| 242 |
block_reason_str = full_reason_str[start_index:].strip()
|
|
|
|
| 236 |
elif isinstance(error, generation_types.BlockedPromptException):
|
| 237 |
try:
|
| 238 |
full_reason_str = str(error.args[0])
|
| 239 |
+
logger.error(f"{full_reason_str}")
|
| 240 |
if "block_reason:" in full_reason_str:
|
| 241 |
start_index = full_reason_str.find("block_reason:") + len("block_reason:")
|
| 242 |
block_reason_str = full_reason_str[start_index:].strip()
|