Skip to content

Commit

Permalink
chore : 인코딩 파일 업로드 에러 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sk000801 committed Nov 29, 2023
1 parent b2da04c commit 190a96b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions server/src/config/errorCode.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum ERROR_CODE {
'SERVER_ERROR' = 5000,
'SERVICE_ERROR' = 5001,
'MUSIC_ENCODE_ERROR' = 5002,
'ENCODED_MUSIC_UPLOAD_ERROR' = 5003,
'NOT_EXIST_PLAYLIST_ON_USER' = 4001,
'NOT_EXIST_MUSIC' = 4002,
'ALREADY_ADDED' = 4003,
Expand Down
9 changes: 6 additions & 3 deletions server/src/music/music.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ export class MusicService {

return encodedFileURL;
} catch (err) {
console.log(err);
if (err instanceof CatchyException) {
throw err;
}

throw new CatchyException(
'MUSIC_ENCODE_ERROR',
HTTP_STATUS_CODE.SERVER_ERROR,
Expand Down Expand Up @@ -156,9 +159,9 @@ export class MusicService {
return m3u8Path;
} catch {
throw new CatchyException(
'MUSIC_ENCODE_ERROR',
'ENCODED_MUSIC_UPLOAD_ERROR',
HTTP_STATUS_CODE.SERVER_ERROR,
ERROR_CODE.SERVER_ERROR,
ERROR_CODE.ENCODED_MUSIC_UPLOAD_ERROR,
);
}
}
Expand Down

0 comments on commit 190a96b

Please sign in to comment.