ErrorAI 1.9.1__tar.gz → 1.9.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {errorai-1.9.1 → errorai-1.9.3}/ErrorAI.egg-info/PKG-INFO +1 -1
- {errorai-1.9.1 → errorai-1.9.3}/PKG-INFO +1 -1
- {errorai-1.9.1 → errorai-1.9.3}/errorai/providers.py +7 -1
- {errorai-1.9.1 → errorai-1.9.3}/errorai/runtime.py +5 -1
- {errorai-1.9.1 → errorai-1.9.3}/pyproject.toml +1 -1
- {errorai-1.9.1 → errorai-1.9.3}/ErrorAI.egg-info/SOURCES.txt +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/ErrorAI.egg-info/dependency_links.txt +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/ErrorAI.egg-info/entry_points.txt +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/ErrorAI.egg-info/requires.txt +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/ErrorAI.egg-info/top_level.txt +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/README.md +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/__init__.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/__main__.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/bootstrap.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/cli.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/compat.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/config.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/environment.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/pipeline.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/errorai/universal.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/setup.cfg +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/tests/test_bootstrap.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/tests/test_config.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/tests/test_runtime.py +0 -0
- {errorai-1.9.1 → errorai-1.9.3}/tests/test_safety.py +0 -0
|
@@ -173,6 +173,7 @@ class HttpApiProvider(ModelProvider):
|
|
|
173
173
|
"""
|
|
174
174
|
|
|
175
175
|
config: ModelConfig
|
|
176
|
+
last_error: str | None = None
|
|
176
177
|
|
|
177
178
|
def suggest_patch(self, snippet: str, error_message: str) -> str | None:
|
|
178
179
|
prompt = (
|
|
@@ -206,7 +207,12 @@ class HttpApiProvider(ModelProvider):
|
|
|
206
207
|
with urllib.request.urlopen(request, timeout=self.config.http_api_timeout) as response:
|
|
207
208
|
body = json.loads(response.read().decode("utf-8"))
|
|
208
209
|
text = body["choices"][0]["message"]["content"]
|
|
209
|
-
except
|
|
210
|
+
except Exception as exc:
|
|
211
|
+
# Any failure here (network down, SSL/proxy quirks, malformed
|
|
212
|
+
# response, endpoint changed shape, etc.) should degrade to "no
|
|
213
|
+
# fix found", never bubble up and look like a crash. Stash the
|
|
214
|
+
# real reason on the instance so the caller can log it if useful.
|
|
215
|
+
self.last_error = f"{type(exc).__name__}: {exc}"
|
|
210
216
|
return None
|
|
211
217
|
|
|
212
218
|
return _clean_line_response(text, snippet)
|
|
@@ -218,7 +218,11 @@ class RuntimeManager:
|
|
|
218
218
|
if not plan or not filename or "<" in filename:
|
|
219
219
|
self.reporter.log("exception.analyzed", {"analysis": analysis, "fixed": False})
|
|
220
220
|
print(f"[errorai] Caught {analysis['type']}: {analysis['message']}")
|
|
221
|
-
|
|
221
|
+
provider_reason = getattr(self.provider, "last_error", None)
|
|
222
|
+
if provider_reason:
|
|
223
|
+
print(f"[errorai] No fix: provider request failed ({provider_reason})")
|
|
224
|
+
else:
|
|
225
|
+
print("[errorai] No automatic fix rule matched this error.")
|
|
222
226
|
return False
|
|
223
227
|
|
|
224
228
|
print(f"[errorai] Caught {analysis['type']}: {analysis['message']}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|