Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mantasfam committed Jul 21, 2023
1 parent 4fd91a5 commit cb18c6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
Body,
Controller,
Get,
Post,
Query,
UseFilters,
HttpException,
} from '@nestjs/common';
import { Body, Controller, Get, Post, Query, UseFilters } from '@nestjs/common';
import { AppService } from './app.service';
import {
GetPoolAndTokenVolumesReply,
Expand All @@ -22,11 +14,7 @@ export class AppController {

@Get('tvl')
async getTvl(@Query() req: GetTvlRequest): Promise<GetTvlReply> {
try {
return await this.appService.getTvl(req);
} catch (e) {
throw new HttpException(e.message, 500);
}
return await this.appService.getTvl(req);
}

@Post('pool-token-volumes')
Expand Down
2 changes: 2 additions & 0 deletions src/generic.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
ExecutionContext,
Injectable,
NestInterceptor,
HttpException,
} from '@nestjs/common';
import { Observable, tap } from 'rxjs';
import { log } from './util/logger/logger';
Expand Down Expand Up @@ -34,6 +35,7 @@ export class GenericInterceptor implements NestInterceptor {
detail: err?.name,
endpoint: endpoint.name,
});
throw new HttpException(err.message, 500);
},
}),
);
Expand Down

0 comments on commit cb18c6b

Please sign in to comment.