- Rename error handler.

- Truncate errors.
- Better error tags, release version etc.
This commit is contained in:
Andras Bacsai
2022-02-14 09:28:37 +01:00
parent 70d3448110
commit b4a418dded
95 changed files with 260 additions and 226 deletions

View File

@@ -1,7 +1,7 @@
import { dev } from '$app/env';
import { getTeam } from '$lib/common';
import * as db from '$lib/database';
import { PrismaErrorHandler } from '$lib/database';
import { ErrorHandler } from '$lib/database';
import type { RequestHandler } from '@sveltejs/kit';
export const options = async () => {
@@ -36,6 +36,6 @@ export const get: RequestHandler = async (request) => {
headers: { Location: `/webhooks/success` }
};
} catch (error) {
return PrismaErrorHandler(error);
return ErrorHandler(error);
}
};

View File

@@ -1,5 +1,5 @@
import * as db from '$lib/database';
import { PrismaErrorHandler } from '$lib/database';
import { ErrorHandler } from '$lib/database';
import type { RequestHandler } from '@sveltejs/kit';
export const options = async () => {
@@ -24,6 +24,6 @@ export const get: RequestHandler = async (request) => {
headers: { Location: `/webhooks/success` }
};
} catch (error) {
return PrismaErrorHandler(error);
return ErrorHandler(error);
}
};