fix: Sentry

This commit is contained in:
Andras Bacsai 2022-05-06 15:40:07 +02:00
parent fa5f439858
commit 6a6426fe6b
4 changed files with 66 additions and 67 deletions

View File

@ -114,5 +114,5 @@ export const getSession: GetSession = function ({ locals }) {
};
export async function handleError({ error, event }) {
if (!dev) sentry.captureException(error, event);
// if (!dev) sentry.captureException(error, event);
}

View File

@ -58,7 +58,7 @@ export function ErrorHandler(e: {
truncatedError.message = 'git clone failed';
}
if (!e.message?.includes('Coolify Proxy is not running')) {
sentry.captureException(truncatedError);
// sentry.captureException(truncatedError);
}
const payload = {
status: truncatedError.status || 500,

View File

@ -328,7 +328,7 @@ export default async function (job: Job<BuilderJob, void, string>): Promise<void
await saveBuildLog({ line: 'Deployment successful!', buildId, applicationId });
} catch (error) {
await saveBuildLog({ line: error, buildId, applicationId });
sentry.captureException(error);
// sentry.captureException(error);
throw new Error(error);
}
await saveBuildLog({ line: 'Proxy will be updated shortly.', buildId, applicationId });

View File

@ -31,7 +31,7 @@ async function stopBuild(buildId, applicationId) {
}
if (count > 100) {
clearInterval(interval);
return resolve();
return reject(new Error('Build canceled'));
}
const { stdout: buildContainers } = await asyncExecShell(
@ -70,7 +70,6 @@ export const post: RequestHandler = async (event) => {
}
try {
await stopBuild(buildId, applicationId);
await cleanupDB(buildId);
return {
status: 200,
body: {