Docs: 에러 알림 구분 — n8n 워크플로우 에러 vs 봇 요약 처리 에러

- Error Trigger: 임베드 형식으로 변경, 실패 노드/실행 ID 포함, fallback 처리
- Switch error: footer를 "봇 요약 처리 에러"로 구분
- 에러 유형 비교 테이블 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sm4640
2026-03-25 16:00:11 +09:00
parent 11b3a60be8
commit b9e1c4fb45
2 changed files with 37 additions and 4 deletions

View File

@@ -213,7 +213,7 @@ return $input.all().filter(item => {
{ "name": "에러 타입", "value": "`{{ $json.error_type }}`", "inline": true },
{ "name": "에러 내용", "value": "```\n{{ $json.error_message }}\n```", "inline": false }
],
"footer": { "text": "YouTube 뉴스 요약 봇 - 에러 알림" }
"footer": { "text": " 요약 처리 에러 — FastAPI 응답" }
}]
}
```

View File

@@ -236,7 +236,7 @@ return $input.all().filter(item => {
{ "name": "에러 내용", "value": "```\n{{ $json.error_message }}\n```", "inline": false }
],
"footer": {
"text": "YouTube 뉴스 요약 봇 - 에러 알림"
"text": " 요약 처리 에러 — FastAPI 응답"
}
}]
}
@@ -244,17 +244,50 @@ return $input.all().filter(item => {
## 에러 처리
### Error Trigger 워크플로우 (선택)
에러 알림은 두 종류로 구분됩니다:
| 구분 | 발생 위치 | 원인 예시 | 알림 제목 |
|---|---|---|---|
| **워크플로우 에러** | n8n 자체 | API 연결 불가, 노드 설정 오류, YouTube API 실패 | ⚠️ n8n 워크플로우 에러 |
| **요약 처리 에러** | FastAPI 봇 | 자막 없음, 쿠키 만료, Claude API 오류 | ❌ [채널명] 뉴스 요약 실패 |
### Error Trigger 워크플로우 (n8n 워크플로우 에러)
메인 워크플로우 자체가 실패하는 경우를 대비해 별도 에러 워크플로우를 만들 수 있습니다.
1. 새 워크플로우 생성 → **Error Trigger** 노드 추가
2. **HTTP Request** 노드로 Discord Webhook 호출:
| 설정 항목 | 값 |
|---|---|
| Type | HTTP Request |
| Method | POST |
| URL | Discord 웹훅 URL |
| Send Body | ON |
| Body Content Type | JSON |
| Specify Body | Using JSON |
**Body (Expression 모드):**
```json
{
"content": "뉴스 요약 봇 에러 발생!\n워크플로우: {{ $json.workflow.name }}\n에러: {{ $json.execution.error.message }}"
"embeds": [{
"title": "⚠️ n8n 워크플로우 에러",
"color": 16753920,
"description": "n8n 워크플로우 실행 중 에러가 발생했습니다. 봇 요약 처리가 아닌 **워크플로우 자체 문제**입니다.",
"fields": [
{ "name": "워크플로우", "value": "{{ $json.workflow.name }}", "inline": true },
{ "name": "실패 노드", "value": "{{ $json.execution.lastNodeExecuted }}", "inline": true },
{ "name": "에러 내용", "value": "```\n{{ $json.execution.error.message || '상세 내용 없음' }}\n```", "inline": false },
{ "name": "실행 ID", "value": "`{{ $json.execution.id }}`", "inline": true }
],
"footer": {
"text": "n8n Error Trigger — 워크플로우 에러"
}
}]
}
```
3. 메인 워크플로우의 **Settings → Error Workflow**에서 이 에러 워크플로우를 지정
> **참고:** `$json.execution.error.message`가 빈 값일 수 있으므로 `|| '상세 내용 없음'`으로 fallback 처리합니다.