Skip to content

Commit

Permalink
fix: 코드 오류 수정 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
5uhwann authored Feb 27, 2024
1 parent 802c691 commit a3d4992
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public ExceptionResponse handleIllegalArgumentException(IllegalArgumentException
}

@ExceptionHandler(NoSuchElementException.class)
@ResponseStatus(HttpStatus.NOT_FOUND)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public ExceptionResponse handleNoSuchElementException(NoSuchElementException e) {
return ExceptionResponse.of(HttpStatus.NOT_FOUND, e.getMessage());
return ExceptionResponse.of(HttpStatus.BAD_REQUEST, e.getMessage());
}

@ExceptionHandler(AuthenticationException.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public String collectStamp(@RequestBody CollectStampRequest request) {
return qrStampService.collectStamp(request, collectedAt);
}

@GetMapping("/stmaps")
@GetMapping("/stamps")
public CollectionResultResponse getCollectionResult(@RequestParam String studentName, @RequestParam String studentNumber) {
return qrStampService.getCollectionResult(studentName, studentNumber);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ddingdong.ddingdongBE.domain.qrstamp.entity;

import com.amazonaws.services.kms.model.NotFoundException;
import java.util.Arrays;
import java.util.NoSuchElementException;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

Expand Down Expand Up @@ -62,6 +62,6 @@ public static ClubStamp getByClubCode(String code) {
return Arrays.stream(ClubStamp.values())
.filter(clubStamp -> clubStamp.getCode().equals(code))
.findFirst()
.orElseThrow(() -> new NotFoundException("동아리 코드를 확인해주세요."));
.orElseThrow(() -> new NoSuchElementException("동아리 코드를 확인해주세요."));
}
}

0 comments on commit a3d4992

Please sign in to comment.