File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ import * as Sentry from "@sentry/nextjs";
66import { TRPCError } from "@trpc/server" ;
77
88// tRPC error codes that should not be reported to Sentry (expected client errors)
9- const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = new Set ( [
9+ const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = [
1010 "UNAUTHORIZED" ,
1111 "NOT_FOUND" ,
1212 "BAD_REQUEST" ,
13- ] ) ;
13+ ] ;
1414
1515Sentry . init ( {
1616 dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
@@ -25,7 +25,7 @@ Sentry.init({
2525 beforeSend ( event , hint ) {
2626 if (
2727 hint . originalException instanceof TRPCError &&
28- IGNORED_TRPC_CODES . has ( hint . originalException . code )
28+ IGNORED_TRPC_CODES . includes ( hint . originalException . code )
2929 ) {
3030 return null ;
3131 }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import * as Sentry from "@sentry/nextjs";
66import { TRPCError } from "@trpc/server" ;
77
88// tRPC error codes that should not be reported to Sentry (expected client errors)
9- const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = new Set ( [
9+ const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = ( [
1010 "UNAUTHORIZED" ,
1111 "NOT_FOUND" ,
1212 "BAD_REQUEST" ,
@@ -25,7 +25,7 @@ Sentry.init({
2525 beforeSend ( event , hint ) {
2626 if (
2727 hint . originalException instanceof TRPCError &&
28- IGNORED_TRPC_CODES . has ( hint . originalException . code )
28+ IGNORED_TRPC_CODES . includes ( hint . originalException . code )
2929 ) {
3030 return null ;
3131 }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import * as Sentry from "@sentry/nextjs";
66import { TRPCError } from "@trpc/server" ;
77
88// tRPC error codes that should not be reported to Sentry (expected client errors)
9- const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = new Set ( [
9+ const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = ( [
1010 "UNAUTHORIZED" ,
1111 "NOT_FOUND" ,
1212 "BAD_REQUEST" ,
@@ -25,7 +25,7 @@ Sentry.init({
2525 beforeSend ( event , hint ) {
2626 if (
2727 hint . originalException instanceof TRPCError &&
28- IGNORED_TRPC_CODES . has ( hint . originalException . code )
28+ IGNORED_TRPC_CODES . includes ( hint . originalException . code )
2929 ) {
3030 return null ;
3131 }
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ import * as Sentry from "@sentry/nextjs";
66import { TRPCError } from "@trpc/server" ;
77
88// tRPC error codes that should not be reported to Sentry (expected client errors)
9- const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = new Set ( [
9+ const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = [
1010 "UNAUTHORIZED" ,
1111 "NOT_FOUND" ,
1212 "BAD_REQUEST" ,
13- ] ) ;
13+ ] ;
1414
1515Sentry . init ( {
1616 dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
@@ -25,7 +25,7 @@ Sentry.init({
2525 beforeSend ( event , hint ) {
2626 if (
2727 hint . originalException instanceof TRPCError &&
28- IGNORED_TRPC_CODES . has ( hint . originalException . code )
28+ IGNORED_TRPC_CODES . includes ( hint . originalException . code )
2929 ) {
3030 return null ;
3131 }
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ import { TRPCError } from "@trpc/server";
88import { env } from "@/env" ;
99
1010// tRPC error codes that should not be reported to Sentry (expected client errors)
11- const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = new Set ( [
11+ const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = [
1212 "UNAUTHORIZED" ,
1313 "NOT_FOUND" ,
1414 "BAD_REQUEST" ,
15- ] ) ;
15+ ] ;
1616
1717Sentry . init ( {
1818 dsn : env . NEXT_PUBLIC_SENTRY_DSN ,
@@ -27,7 +27,7 @@ Sentry.init({
2727 beforeSend ( event , hint ) {
2828 if (
2929 hint . originalException instanceof TRPCError &&
30- IGNORED_TRPC_CODES . has ( hint . originalException . code )
30+ IGNORED_TRPC_CODES . includes ( hint . originalException . code )
3131 ) {
3232 return null ;
3333 }
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ import { TRPCError } from "@trpc/server";
88import { env } from "@/env" ;
99
1010// tRPC error codes that should not be reported to Sentry (expected client errors)
11- const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = new Set ( [
11+ const IGNORED_TRPC_CODES : TRPCError [ "code" ] [ ] = [
1212 "UNAUTHORIZED" ,
1313 "NOT_FOUND" ,
1414 "BAD_REQUEST" ,
15- ] ) ;
15+ ] ;
1616
1717Sentry . init ( {
1818 dsn : env . NEXT_PUBLIC_SENTRY_DSN ,
@@ -27,7 +27,7 @@ Sentry.init({
2727 beforeSend ( event , hint ) {
2828 if (
2929 hint . originalException instanceof TRPCError &&
30- IGNORED_TRPC_CODES . has ( hint . originalException . code )
30+ IGNORED_TRPC_CODES . includes ( hint . originalException . code )
3131 ) {
3232 return null ;
3333 }
Original file line number Diff line number Diff line change @@ -81,11 +81,11 @@ export class Tracker {
8181 }
8282
8383 private isOngoingReport ( ) {
84- const resolved : StatusReport [ "status" ] [ ] = new Set ( [
84+ const resolved : StatusReport [ "status" ] [ ] = [
8585 "monitoring" ,
8686 "resolved" ,
87- ] ) ;
88- return this . statusReports . some ( ( report ) => ! resolved . has ( report . status ) ) ;
87+ ] ;
88+ return this . statusReports . some ( ( report ) => ! resolved . includes ( report . status ) ) ;
8989 }
9090
9191 private isOngoingMaintenance ( ) {
@@ -155,7 +155,7 @@ export class Tracker {
155155 // HACK: this is a temporary solution to get the status reports
156156 private getStatusReportsByDay ( props : Monitor ) : StatusReports {
157157 const statusReports = this . statusReports ?. filter ( ( report ) => {
158- const firstStatusReportUpdate = report ?. statusReportUpdates ?. toSorted (
158+ const firstStatusReportUpdate = report ?. statusReportUpdates ?. sort (
159159 ( a , b ) => a . date . getTime ( ) - b . date . getTime ( ) ,
160160 ) ?. [ 0 ] ;
161161
You can’t perform that action at this time.
0 commit comments