INNER CODE UNIT · TypeScript

notFound

runvendo/vendo · corpus/hosts/express-host/src/server/index.ts:27

function notFound(res: Response, id: string): void {
  res.status(404).json({ error: { code: "not-found", message: `Task not found: ${id}` } });
}

function text(value: unknown): string | undefined {
  return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
}

export function createRelayServer(options: RelayServerOptions = {}): RelayServer {
  const app = express();
  const tasks = options.tasks ?? new TaskStore();
  const vendo = createRelayVendo({
    ...(options.model === undefined ? {} : { model: options.model }),
    ...(options.store === undefined ? {} : { store: options.store }),
  });

  app.disable("x-powered-by");
  app.use("/api/vendo", (req, res, next) => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…