mirror of
https://github.com/morluto/rea.git
synced 2026-11-30 02:17:09 +00:00
refactor(providers): share the offline adapter error fallback (#14466)
This commit is contained in:
1 parent
6c51be5317
commit
2c847e767c
11 files changed
+31
-128
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user