Skip to content

Commit 649ae30

Browse files
committed
Fix error
1 parent aabd439 commit 649ae30

File tree

1 file changed

+2
-1
lines changed
  • src/fastapi_cloud_cli/utils

1 file changed

+2
-1
lines changed

src/fastapi_cloud_cli/utils/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import logging
23
import time
34
from contextlib import contextmanager
@@ -189,6 +190,6 @@ def stream_build_logs(
189190
def _parse_log_line(self, line: str) -> Optional[BuildLogLine]:
190191
try:
191192
return BuildLogAdapter.validate_json(line)
192-
except ValidationError as e:
193+
except (ValidationError, json.JSONDecodeError) as e:
193194
logger.debug("Skipping malformed log: %s (error: %s)", line[:100], e)
194195
return None

0 commit comments

Comments
 (0)