mirror of
https://github.com/morluto/rea.git
synced 2026-11-06 23:06:18 +00:00
fix(reference): separate local filesystem diagnostics from graph commitments
This commit is contained in:
1 parent
b165b0e830
commit
cae03361cf
12 files changed
+220
-38
No files matched your search
@@ -42,6 +42,7 @@ export const validateDirectory = async (
|
||||
readonly ok: false;
|
||||
readonly code: ReferenceSourceFailureCode;
|
||||
readonly message: string;
|
||||
readonly localDiagnostic?: string;
|
||||
}
|
||||
> => {
|
||||
try {
|
||||
@@ -76,15 +77,15 @@ export const validateDirectory = async (
|
||||
code: "cancelled",
|
||||
message: "Reference source traversal cancelled",
|
||||
};
|
||||
const message = filesystemFailureDetail(
|
||||
const detail = filesystemFailureDetail(
|
||||
cause,
|
||||
"Directory identity could not be verified",
|
||||
);
|
||||
if (message === undefined) throw cause;
|
||||
if (detail === undefined) throw cause;
|
||||
return {
|
||||
ok: false,
|
||||
code: "io",
|
||||
message,
|
||||
...detail,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user