Skip to content

Commit 755313b

Browse files
joamagclaude
andcommitted
feat: add TRACE logging for HTTP error details in resolvers
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cb7a8a4 commit 755313b

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
*
12+
* TRACE logging for HTTP error details in netius and requests resolvers
1313

1414
### Changed
1515

src/appier/http.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ def _resolve_requests(url, method, headers, data, silent, timeout, **kwargs):
790790
# it represent an error, if that's the case raised an error exception
791791
# to the upper layers to break the current execution logic properly
792792
code = response.getcode()
793-
base.get_logger().trace("Requests %s %s returned %d", method.upper(), url, code)
793+
base.get_logger().trace("Requests %s %s returned %s", method.upper(), url, code)
794794
is_error = _is_error(code)
795795
if is_error:
796796
raise legacy.HTTPError(url, code, "HTTP retrieval problem", None, response)
@@ -917,9 +917,12 @@ def _resolve_netius(url, method, headers, data, silent, timeout, **kwargs):
917917
# it represent an error, if that's the case raised an error exception
918918
# to the upper layers to break the current execution logic properly
919919
code = response.getcode()
920-
base.get_logger().trace("Netius %s %s returned %d", method, url, code)
920+
base.get_logger().trace("Netius %s %s returned %s", method, url, code)
921921
is_error = _is_error(code)
922922
if is_error:
923+
base.get_logger().trace(
924+
"Netius %s %s returned error %s (%s)", method, url, error, code
925+
)
923926
raise legacy.HTTPError(
924927
url,
925928
code,

0 commit comments

Comments
 (0)