Skip to content

Commit 5913727

Browse files
refactor(platform): remove redundant try catch blocks (fastify)
1 parent 883c8d4 commit 5913727

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

packages/platform-fastify/adapters/fastify-adapter.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,11 @@ export class FastifyAdapter<TInstance = any> extends AbstractHttpAdapter {
159159
}
160160

161161
public enableCors(options: CorsOptions) {
162-
try {
163-
this.register(cors, options);
164-
} catch {}
162+
this.register(cors, options);
165163
}
166164

167165
public registerParserMiddleware() {
168-
try {
169-
this.register(formBody);
170-
} catch {}
166+
this.register(formBody);
171167
}
172168

173169
public createMiddlewareFactory(

0 commit comments

Comments
 (0)