mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 10:25:23 +00:00
added a dedicated error handler service
This commit is contained in:
@ -6,6 +6,7 @@ import { setupSwaggerAuthentication } from '../libs/common/src/util/user-auth.sw
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { json, urlencoded } from 'body-parser';
|
||||
import { SeederService } from '@app/common/seed/services/seeder.service';
|
||||
import { HttpExceptionFilter } from './common/filters/http-exception/http-exception.filter';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
@ -15,6 +16,7 @@ async function bootstrap() {
|
||||
// Set the body parser limit to 1 MB
|
||||
app.use(json({ limit: '1mb' }));
|
||||
app.use(urlencoded({ limit: '1mb', extended: true }));
|
||||
app.useGlobalFilters(new HttpExceptionFilter());
|
||||
|
||||
app.use(
|
||||
rateLimit({
|
||||
|
Reference in New Issue
Block a user