Skip to content

Commit

Permalink
fix: use sentry graphql exception filter and fix getXUDTList cache key (
Browse files Browse the repository at this point in the history
  • Loading branch information
ahonn authored Sep 24, 2024
1 parent 39d9d7c commit 364b25a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { APP_FILTER } from '@nestjs/core';
import { CacheModule, CacheStore } from '@nestjs/cache-manager';
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { SentryGlobalFilter, SentryModule } from '@sentry/nestjs/setup';
import { SentryGlobalGraphQLFilter, SentryModule } from '@sentry/nestjs/setup';
import type { RedisClientOptions } from 'redis';
import { redisStore } from 'cache-manager-redis-yet';
import { Env } from './env';
Expand Down Expand Up @@ -58,7 +58,7 @@ import { BootstrapService } from './bootstrap.service';
BootstrapService,
{
provide: APP_FILTER,
useClass: SentryGlobalFilter,
useClass: SentryGlobalGraphQLFilter,
},
],
controllers: [AppController],
Expand Down
2 changes: 1 addition & 1 deletion backend/src/core/ckb-explorer/ckb-explorer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class CkbExplorerService {

@Cacheable({
namespace: 'CkbExplorerService',
key: (address: string, tags, sort, page = 1, pageSize = 10) =>
key: (address: string, tags = [], sort, page = 1, pageSize = 10) =>
`getXUDTList:${address},${tags.join('|')},${sort},${page},${pageSize}`,
ttl: 10_000,
})
Expand Down

0 comments on commit 364b25a

Please sign in to comment.