fix: Haproxy errors
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "coolify",
|
"name": "coolify",
|
||||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||||
"version": "2.2.6",
|
"version": "2.2.7",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "docker-compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev",
|
"dev": "docker-compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev",
|
||||||
|
@@ -138,12 +138,7 @@ export async function haproxyInstance() {
|
|||||||
|
|
||||||
export async function configureHAProxy() {
|
export async function configureHAProxy() {
|
||||||
const haproxy = await haproxyInstance();
|
const haproxy = await haproxyInstance();
|
||||||
|
await checkHAProxy(haproxy);
|
||||||
try {
|
|
||||||
await checkHAProxy(haproxy);
|
|
||||||
} catch (error) {
|
|
||||||
return 'Error: HAProxy is not running';
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = {
|
const data = {
|
||||||
|
@@ -49,11 +49,7 @@ export async function completeTransaction(transactionId) {
|
|||||||
}
|
}
|
||||||
export async function deleteProxy({ id }) {
|
export async function deleteProxy({ id }) {
|
||||||
const haproxy = await haproxyInstance();
|
const haproxy = await haproxyInstance();
|
||||||
try {
|
await checkHAProxy(haproxy);
|
||||||
await checkHAProxy(haproxy);
|
|
||||||
} catch (error) {
|
|
||||||
return 'Error: HAProxy is not running';
|
|
||||||
}
|
|
||||||
|
|
||||||
let transactionId;
|
let transactionId;
|
||||||
try {
|
try {
|
||||||
|
@@ -5,7 +5,6 @@ export default async function () {
|
|||||||
try {
|
try {
|
||||||
return await configureHAProxy();
|
return await configureHAProxy();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error.response?.body || error);
|
|
||||||
return ErrorHandler(error.response?.body || error);
|
return ErrorHandler(error.response?.body || error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user