-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
비디오 업로드 예외처리 #164
비디오 업로드 예외처리 #164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨어요!
server/src/video/video.service.ts
Outdated
@@ -150,10 +154,20 @@ export class VideoService { | |||
} | |||
|
|||
async uploadVideo(videoDto: VideoDto, uuid: string, videoId: string) { | |||
if (!Types.ObjectId.isValid(videoId)) throw new VideoNotFoundException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
비디오 업로드 시 비디오를 찾을 수 없는 오류는 조금 어색해보여요
id가 잘못된거니까 BadRequestFormat이 좋아보이는데 어떠신가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 좋아요~!
/** | ||
* 회원가입 시 프로필 이미지를 PUT하는 url 발급 | ||
*/ | ||
@Get('signup/presigned-url/profile') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 프로필이미지 put presigned Url 발급을 나눈게 굉장히 좋은 거 같아요!
프로필 변경시 발급에서는 본인 Id만 발급가능하도록 할 수 있고, 회원가입시 발급에서는 DB에 없는 Id만 발급가능하게 해서 예외처리 할 수 있으니까요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅎㅎㅎ
Co-authored-by: 5tarry <hacherry05@naver.com>
Co-authored-by: 5tarry <hacherry05@naver.com>
[ErrorCode.ProfileUploadRequired]: '프로필 이미지를 먼저 업로드 해야합니다.', | ||
[ErrorCode.ThumbnailUploadRequired]: '썸네일을 먼저 업로드 해야합니다.', | ||
[ErrorCode.VideoUploadRequired]: '비디오를 먼저 업로드 해야합니다.', | ||
[ErrorCode.BadRequestFormat]: '요청 형식이 잘못됨', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 반영 감사합니다! 👍
resolved: #163
작업 내용