Skip to content
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

廃止: HTTP エラーと重複するエラーロギングを削除 #1348

Merged
merged 4 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions voicevox_engine/app/routers/speaker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""話者情報機能を提供する API Router"""

import base64
import traceback
from pathlib import Path
from typing import Annotated, Literal

Expand Down Expand Up @@ -126,7 +125,6 @@ def _speaker_info(
}
)
except FileNotFoundError:
traceback.print_exc()
msg = "追加情報が見つかりませんでした"
raise HTTPException(status_code=500, detail=msg)

Expand Down
6 changes: 0 additions & 6 deletions voicevox_engine/app/routers/user_dict.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""ユーザー辞書機能を提供する API Router"""

import traceback
from typing import Annotated

from fastapi import APIRouter, Body, Depends, HTTPException, Path, Query
Expand Down Expand Up @@ -35,7 +34,6 @@ def get_user_dict_words() -> dict[str, UserDictWord]:
except UserDictInputError as err:
raise HTTPException(status_code=422, detail=str(err))
except Exception:
traceback.print_exc()
raise HTTPException(
status_code=500, detail="辞書の読み込みに失敗しました。"
)
Expand Down Expand Up @@ -81,7 +79,6 @@ def add_user_dict_word(
except UserDictInputError as err:
raise HTTPException(status_code=422, detail=str(err))
except Exception:
traceback.print_exc()
raise HTTPException(
status_code=500, detail="ユーザー辞書への追加に失敗しました。"
)
Expand Down Expand Up @@ -132,7 +129,6 @@ def rewrite_user_dict_word(
except UserDictInputError as err:
raise HTTPException(status_code=422, detail=str(err))
except Exception:
traceback.print_exc()
raise HTTPException(
status_code=500, detail="ユーザー辞書の更新に失敗しました。"
)
Expand All @@ -153,7 +149,6 @@ def delete_user_dict_word(
except UserDictInputError as err:
raise HTTPException(status_code=422, detail=str(err))
except Exception:
traceback.print_exc()
raise HTTPException(
status_code=500, detail="ユーザー辞書の更新に失敗しました。"
)
Expand All @@ -180,7 +175,6 @@ def import_user_dict_words(
except UserDictInputError as err:
raise HTTPException(status_code=422, detail=str(err))
except Exception:
traceback.print_exc()
raise HTTPException(
status_code=500, detail="ユーザー辞書のインポートに失敗しました。"
)
Expand Down
2 changes: 0 additions & 2 deletions voicevox_engine/user_dict/user_dict_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import json
import sys
import threading
import traceback
from collections.abc import Callable
from pathlib import Path
from typing import Any, Final, TypeVar
Expand Down Expand Up @@ -160,7 +159,6 @@ def _update_dict(

except Exception as e:
print("Error: Failed to update dictionary.", file=sys.stderr)
traceback.print_exc(file=sys.stderr)
raise e

finally:
Expand Down