refactor(providers): share the offline adapter error fallback (#14466)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-11-25 08:28:28 -05:00
1 parent 6c51be5317
commit 2c847e767c
11 files changed
+31 -128

No files matched your search

-10
View File
@@ -15,7 +15,6 @@ import {
type InspectPythonPycInput,
type PythonPycLimits,
} from "../domain/python/pythonPyc.js";
import { ProviderAdapterError } from "../domain/providerAdapterError.js";
import { err, ok } from "../domain/result.js";
import {
PYTHON_PYC_FORMAT,
@@ -26,7 +25,6 @@ import {
parseLimitConstraint,
} from "../domain/parseFailureAnalysisError.js";
import { parsePythonPyc } from "./PythonPycParser.js";
import { errorMessage } from "../kernel/errorMessage.js";
import { classifyProviderFailure } from "../providers/classifyProviderFailure.js";
import { offlineArtifactFailureDialect } from "../providers/offlineArtifactFailure.js";
@@ -86,14 +84,6 @@ const failureFor = (
...parserLimitRecovery(input, ["max_file_bytes"]),
},
),
unclassified: (failure) =>
new ProviderAdapterError(PYTHON_PYC_PROVIDER_IDENTITY.id, OPERATION, {
cause: failure,
diagnostics: {
path: input.path,
reason: errorMessage(failure),
},
}),
}),
),
input.path,