tcmSaid

tcmts.studio.tcmSaid · #eqwfoqhy · term · runs anywhere

What a tcm command the studio ran said and how it went, kept for its page: refused, its first lines are the error.

import { HttpError } from "#codebase/tcmts/server";

export function said(out: { code: number; text: string }, what: string): string {
  if (out.code !== 0)
    throw new HttpError(400, out.text.split("\n").slice(0, 8).join("\n") || `${what} failed`);
  return out.text;
}

uses

used by