Skip to content

Commit

Permalink
Merge pull request #527 from roboflow/iuri/fix-num-errors-undefined
Browse files Browse the repository at this point in the history
Increment `num_errors` only if `pingback` initialized
  • Loading branch information
iurisilvio authored Aug 2, 2024
2 parents 87cd75a + 67b0683 commit 13295b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inference/core/interfaces/http/http_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ async def count_errors(request: Request, call_next):
Response: The response from the next middleware or endpoint.
"""
response = await call_next(request)
if response.status_code >= 400:
if self.model_manager.pingback and response.status_code >= 400:
self.model_manager.num_errors += 1
return response

Expand Down

0 comments on commit 13295b6

Please sign in to comment.