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

Show WebAPI system warning message. #2075

Merged
merged 1 commit into from
Nov 25, 2024
Merged
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
6 changes: 6 additions & 0 deletions tidy3d/web/core/http_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
KEY_APIKEY,
SIMCLOUD_APIKEY,
)
from .core_config import get_logger
from .environment import Env
from .exceptions import WebError

Expand Down Expand Up @@ -139,6 +140,11 @@ def wrapper(*args, **kwargs):
if not resp.text:
return None
result = resp.json()
warning = result.get("warning")
if warning:
log = get_logger()
log.warning(warning)

return result.get("data") if "data" in result else result

return wrapper
Expand Down
Loading