Skip to content

Commit 1c00dc9

Browse files
authored
Merge pull request #139 from eadwinCode/error_logging_warning
fix: Operation exception Log Level
2 parents da17ee5 + c19c84b commit 1c00dc9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ninja_extra/operation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def _prep_run(
167167
)
168168
except Exception as e:
169169
self._log_action(
170-
request_logger.error,
170+
request_logger.warning,
171171
request=request,
172172
ex=e,
173173
extra={"request": request},
@@ -269,7 +269,7 @@ async def _prep_run( # type:ignore
269269
)
270270
except Exception as e:
271271
self._log_action(
272-
request_logger.error,
272+
request_logger.warning,
273273
request=request,
274274
ex=e,
275275
extra={"request": request},

tests/test_operation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_route_operation_execution_works(self):
3535

3636
# @mock_signal_call("route_context_started")
3737
# @mock_signal_call("route_context_finished")
38-
@mock_log_call("error")
38+
@mock_log_call("warning")
3939
def test_route_operation_execution_should_log_execution(self):
4040
client = TestClient(self.SomeTestController)
4141
with pytest.raises(CustomException):
@@ -108,7 +108,7 @@ async def test_async_route_operation_execution_works(self):
108108

109109
# @mock_signal_call("route_context_started")
110110
# @mock_signal_call("route_context_finished")
111-
@mock_log_call("error")
111+
@mock_log_call("warning")
112112
async def test_async_route_operation_execution_should_log_execution(self):
113113
client = TestAsyncClient(self.SomeTestController)
114114
with pytest.raises(CustomException):

0 commit comments

Comments
 (0)