more frontend for clients

This commit is contained in:
miloschwartz
2025-02-21 17:13:23 -05:00
parent 204403da67
commit 3830ad65fc
3 changed files with 22 additions and 21 deletions

View File

@@ -77,11 +77,11 @@ export async function pickClientDefaults(
const parsedSite = sitesRequiredFields.safeParse(site);
if (!parsedSite.success) {
logger.error("Unable to pick client defaults because: " + fromError(parsedSite.error).toString());
return next(
createHttpError(
HttpCode.BAD_REQUEST,
"Unable to pick client defaults because: " +
fromError(parsedSite.error).toString()
"Site is not configured to accept client connectivity"
)
);
}

View File

@@ -20,7 +20,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
const newt = client as Newt;
logger.debug(JSON.stringify(message.data));
logger.debug("Handling Newt get config message!");
@@ -60,7 +60,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
let site: Site | undefined;
if (!site) {
const address = await getNextAvailableSubnet();
const listenPort = await getNextAvailablePort();
const listenPort = await getNextAvailablePort();
// create a new exit node
const [updateRes] = await db