Skip to content

Commit 4d46adb

Browse files
committed
refactor: 오류 처리 개선
1 parent 3c38b63 commit 4d46adb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/controllers/webhook.controller.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export class WebhookController {
1616
next: NextFunction,
1717
): Promise<void> => {
1818
try {
19-
if (!req.body || typeof req.body !== 'object' || req.body.action !== "created") {
19+
20+
if (req.body?.action !== "created") {
2021
const response = new EmptyResponseDto(true, 'Sentry 웹훅 처리에 실패했습니다', {}, null);
2122
res.status(400).json(response);
2223
return;

0 commit comments

Comments
 (0)