Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review: proper HTTP status codes, consistent error messages, fix UI text
Adam Eivyf5c8fabbfd7d
diff --git a/client/src/pages/GitHub.jsx b/client/src/pages/GitHub.jsxindex a37a68223c..8804110472 100644--- a/client/src/pages/GitHub.jsx+++ b/client/src/pages/GitHub.jsx@@ -268,7 +268,7 @@ export default function GitHub() {</button></div><p className="text-xs text-gray-500 mt-2">- Secrets are stored locally and pushed to repos via <code>gh secret set</code>. Values are never sent to the browser.+ Secrets are stored locally and pushed to repos via <code>gh secret set</code>. Stored values are never returned from the server.</p></div>diff --git a/server/routes/github.js b/server/routes/github.jsindex 4ee8060a9c..7b2cf41f66 100644--- a/server/routes/github.js+++ b/server/routes/github.js@@ -76,7 +76,7 @@ router.put('/secrets/:name', asyncHandler(async (req, res) => {router.post('/secrets/:name/sync', asyncHandler(async (req, res) => {const name = req.params.name;if (!/^[A-Z0-9_]{1,100}$/.test(name)) {- return res.status(400).json({ error: 'Invalid secret name.' });+ return res.status(400).json({ error: 'Invalid secret name. Use uppercase letters, digits, and underscores only.' });}const result = await githubService.syncSecretToRepos(name);res.json(result);diff --git a/server/services/github.js b/server/services/github.jsindex 1f3c73451e..ddb90a2a5e 100644--- a/server/services/github.js+++ b/server/services/github.js@@ -2,6 +2,7 @@ import { spawn } from 'child_process';import { writeFile } from 'fs/promises';import { join } from 'path';import { readJSONFile, PATHS, ensureDir } from '../lib/fileUtils.js';+import { ServerError } from '../lib/errorHandler.js';import { getSettings, updateSettings } from './settings.js';const DATA_DIR = PATHS.data;@@ -136,7 +137,7 @@ export async function getRepos() {export async function updateRepoFlags(fullName, updates) {const data = await load();const repo = data.repos[fullName];- if (!repo) throw new Error(`Repo not found: ${fullName}`);+ if (!repo) throw new ServerError(`Repo not found: ${fullName}`, { status: 404, code: 'REPO_NOT_FOUND' });if (updates.flags) {repo.flags = { ...repo.flags, ...updates.flags };@@ -186,7 +187,7 @@ export async function setSecret(name, value) {export async function syncSecretToRepos(name) {const settings = await getSettings();const value = settings.secrets?.[name];- if (!value) throw new Error(`No value stored for secret: ${name}`);+ if (!value) throw new ServerError(`No value stored for secret: ${name}`, { status: 400, code: 'SECRET_NOT_CONFIGURED' });const data = await load();const targetRepos = Object.values(data.repos).filter(