mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: resolve 20 Sentry issues and fix navbar test flakiness
Sentry fixes: - Only send 5xx errors to Sentry (was sending 4xx rate-limit, media type errors) - Encode non-ASCII chars in X-Output-Filename header (encodeURIComponent) - Handle FK constraint failures gracefully in file upload, pipeline save, API keys - Harden getDirSize against ENOENT race on readdirSync Test fixes: - Wrap navbar test renders in act() to flush async useEffect state updates - Add useEffect cleanup to navbar to prevent state updates on unmounted component - Fixes timeout when running in full test suite
This commit is contained in:
@@ -100,7 +100,9 @@ app.setErrorHandler((error: Error & { statusCode?: number }, request, reply) =>
|
||||
{ err: error, url: request.url, method: request.method },
|
||||
"Unhandled request error",
|
||||
);
|
||||
captureException(error, request);
|
||||
if (statusCode >= 500) {
|
||||
captureException(error, request);
|
||||
}
|
||||
const isProduction = process.env.NODE_ENV === "production";
|
||||
reply.status(statusCode).send({
|
||||
error: statusCode >= 500 ? "Internal server error" : error.message,
|
||||
|
||||
Reference in New Issue
Block a user