Skip to content

Commit 37cb998

Browse files
fix: add proper 409 errors to demo
1 parent 264275f commit 37cb998

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

server/matching/src/main/java/meet_at_mensa/matching/controller/MatchingController.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ public ResponseEntity<Group> postApiV2MatchingDemo(MatchRequestNew matchRequestN
223223
// return 200 with MatchRequestCollection if found
224224
return ResponseEntity.ok(demoGroup);
225225

226+
// 409
227+
} catch (RequestOverlapException e) {
228+
229+
// return 409 if user already has a request on that day
230+
return ResponseEntity.status(HttpStatus.CONFLICT).build();
231+
226232
// 500
227233
} catch (Exception e) {
228234

0 commit comments

Comments
 (0)