Skip to content

Commit 9672bf6

Browse files
clean uo
1 parent 82c1bfb commit 9672bf6

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

core/pioreactor/web/utils.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ def abort_with(
2121
error_info: dict[str, t.Any] | None = None,
2222
remediation: str | None = None,
2323
cause: str | None = None,
24-
details: dict[str, t.Any] | None = None,
2524
) -> NoReturn:
26-
if error_info is None and remediation is None and cause is None and details is None:
25+
if error_info is None and remediation is None and cause is None:
2726
abort(status, description=description)
2827
raise AssertionError("abort should not return")
2928

@@ -35,8 +34,6 @@ def abort_with(
3534
merged_error_info["remediation"] = remediation
3635
if cause is not None:
3736
merged_error_info["cause"] = cause
38-
if details is not None:
39-
merged_error_info["details"] = details
4037
if merged_error_info:
4138
payload["error_info"] = merged_error_info
4239

@@ -61,12 +58,6 @@ def ensure_error_info(payload: dict[str, t.Any], status: int) -> dict[str, t.Any
6158
error_info.setdefault("remediation", _default_remediation_for_status(status))
6259
error_info.setdefault("status", status)
6360

64-
if "error_code" in payload and "error_code" not in error_info:
65-
error_info["error_code"] = payload["error_code"]
66-
67-
if "details" in payload and "details" not in error_info:
68-
error_info["details"] = payload["details"]
69-
7061
payload["error_info"] = error_info
7162
return payload
7263

0 commit comments

Comments
 (0)