fix: show clean error for OpenAI encrypted content org mismatch (#884)

This commit is contained in:
jnjpng
2026-02-09 23:44:12 -08:00
committed by GitHub
parent 078a7d41ff
commit fe99bfe4fd
3 changed files with 210 additions and 6 deletions

View File

@@ -179,7 +179,10 @@ import {
parsePatchToAdvancedDiff,
} from "./helpers/diff";
import { setErrorContext } from "./helpers/errorContext";
import { formatErrorDetails } from "./helpers/errorFormatter";
import {
formatErrorDetails,
isEncryptedContentError,
} from "./helpers/errorFormatter";
import { formatCompact } from "./helpers/format";
import { parsePatchOperations } from "./helpers/formatArgsDisplay";
import {
@@ -4527,13 +4530,21 @@ export default function App({
errorObject,
agentIdRef.current,
);
// Encrypted content errors are self-explanatory (include /clear advice)
// — skip the generic "Something went wrong?" hint
appendError(errorDetails, true); // Skip telemetry - already tracked above
// Show appropriate error hint based on stop reason
appendError(
getErrorHintForStopReason(stopReasonToHandle, currentModelId),
true,
);
if (!isEncryptedContentError(errorObject)) {
// Show appropriate error hint based on stop reason
appendError(
getErrorHintForStopReason(
stopReasonToHandle,
currentModelId,
),
true,
);
}
} else {
// No error metadata, show generic error with run info
appendError(