mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 04:32:35 +01:00
capture exception in sentry for embed processing
This commit is contained in:
parent
83ed2c8fdd
commit
63c0fbf62c
@ -27,6 +27,7 @@ import {
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { In } from "typeorm";
|
||||
import { EmbedHandlers } from "@fosscord/api";
|
||||
import * as Sentry from "@sentry/node";
|
||||
const allow_empty = false;
|
||||
// TODO: check webhook, application, system author, stickers
|
||||
// TODO: embed gifs/videos/images
|
||||
@ -219,6 +220,11 @@ export async function postHandleMessage(message: Message) {
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
Sentry.captureException(e, scope => {
|
||||
scope.clear();
|
||||
scope.setContext("request", { url })
|
||||
return scope;
|
||||
});
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) {
|
||||
|
||||
try {
|
||||
var ret = await OPCodeHandler.call(this, data);
|
||||
// transaction.finish();
|
||||
transaction.finish();
|
||||
return ret;
|
||||
} catch (error) {
|
||||
Sentry.captureException(error);
|
||||
|
Loading…
Reference in New Issue
Block a user