-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.http
More file actions
49 lines (41 loc) · 1.28 KB
/
errors.http
File metadata and controls
49 lines (41 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
### ============================
### Error Handling — RFC 9457 Problem Details
### ============================
### 404 — Non-existent session
GET http://localhost:8080/api/v1/sessions/does-not-exist
Accept: application/json
### 400 — Validation error (empty title, missing required fields)
POST http://localhost:8080/api/v1/sessions
Content-Type: application/json
Authorization: Bearer {{jwt_organizer}}
{
"title": "",
"level": "BEGINNER",
"speakerId": "spk-duke",
"durationMinutes": 5
}
### 400 — Custom validator: profanity check
POST http://localhost:8080/api/v1/sessions
Content-Type: application/json
Authorization: Bearer {{jwt_organizer}}
{
"title": "Learn about phishing attacks",
"abstract": "This title contains a blocked word.",
"level": "BEGINNER",
"speakerId": "spk-duke",
"startTime": "2026-10-16T11:00:00",
"durationMinutes": 50
}
### Input sanitization — HTML tags in body should be stripped
POST http://localhost:8080/api/v1/sessions
Content-Type: application/json
Authorization: Bearer {{jwt_organizer}}
{
"title": "Safe Session <script>alert('xss')</script>",
"abstract": "Clean abstract <b>bold</b> text.",
"level": "INTERMEDIATE",
"track": "Security",
"speakerId": "spk-duke",
"startTime": "2026-10-16T11:00:00",
"durationMinutes": 50
}