fix: Error handling

This commit is contained in:
Andras Bacsai
2022-02-14 16:52:00 +01:00
parent 53e7e8b77e
commit 8fc3760eef
9 changed files with 71 additions and 71 deletions

View File

@@ -4,7 +4,12 @@ import { promises as fs } from 'fs';
import yaml from 'js-yaml';
import type { RequestHandler } from '@sveltejs/kit';
import { letsEncrypt } from '$lib/letsencrypt';
import { configureSimpleServiceProxyOn, reloadHaproxy, setWwwRedirection } from '$lib/haproxy';
import {
checkHAProxy,
configureSimpleServiceProxyOn,
reloadHaproxy,
setWwwRedirection
} from '$lib/haproxy';
import { getDomain } from '$lib/components/common';
import { ErrorHandler } from '$lib/database';
@@ -15,6 +20,7 @@ export const post: RequestHandler = async (event) => {
const { id } = event.params;
try {
await checkHAProxy();
const service = await db.getService({ id, teamId });
const {
type,