fix(arch): conservative fallback for gateway error codes
This commit is contained in:
parent
3e20fcb504
commit
1d5f5a1440
@ -1547,30 +1547,22 @@ extension AppControllerDesktopThreadActions on AppController {
|
||||
bool gatewayResultCodeRequiresNewSessionInternal(String code) {
|
||||
final normalized = code.trim().toUpperCase();
|
||||
if (normalized.isEmpty ||
|
||||
normalized == 'SUCCESS' ||
|
||||
normalized == 'COMPLETED' ||
|
||||
normalized == 'READY') {
|
||||
normalized == 'ACP_HTTP_CONNECTION_CLOSED') {
|
||||
return false;
|
||||
}
|
||||
if (normalized == 'RUNNING' ||
|
||||
normalized == 'QUEUED' ||
|
||||
normalized == 'ABORTED' ||
|
||||
normalized == gatewayAcpHttpConnectTimeoutCode ||
|
||||
normalized == gatewayAcpHttpConnectFailedCode ||
|
||||
normalized == gatewayAcpHttpHandshakeInterruptedCode ||
|
||||
normalized == 'BRIDGE_NOT_CONNECTED' ||
|
||||
normalized == 'ACP_HTTP_401' ||
|
||||
normalized == 'ACP_HTTP_403' ||
|
||||
normalized == 'OPENCLAW_GATEWAY_SOCKET_CLOSED' ||
|
||||
normalized == 'OPENCLAW_GATEWAY_QUEUE_FULL' ||
|
||||
normalized == 'OPENCLAW_AGENT_FAILED_BEFORE_REPLY' ||
|
||||
normalized == 'OPENCLAW_NO_DISPLAYABLE_OUTPUT' ||
|
||||
normalized == 'OPENCLAW_NO_EXPORTED_ARTIFACTS' ||
|
||||
normalized == 'OPENCLAW_ARTIFACT_MISSING' ||
|
||||
normalized == 'ARTIFACT_MISSING') {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
if (normalized.startsWith('OPENCLAW_') ||
|
||||
normalized.startsWith('ACP_HTTP_') ||
|
||||
normalized.startsWith('GATEWAY_')) {
|
||||
return true; // Conservative fallback for unrecognized infrastructure/gateway errors
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Future<void> abortRun() async {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user