Summary
Two issues with backup command error handling:
cortex backup import exits with return code 0 even when it fails (e.g., with invalid API key)
cortex backup export prints ugly Python stack trace on failure (though it does exit non-zero)
Reproduction
# Test with invalid API key
CORTEX_API_KEY=invalid cortex backup import -d /some/path
echo $? # Returns 0 (should be non-zero)
CORTEX_API_KEY=invalid cortex backup export -d /some/path
# Prints stack trace (should be clean error message)
Tasks
Summary
Two issues with backup command error handling:
cortex backup importexits with return code 0 even when it fails (e.g., with invalid API key)cortex backup exportprints ugly Python stack trace on failure (though it does exit non-zero)Reproduction
Tasks