Skip to content

Commit

Permalink
fix: debug log the response
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed May 2, 2024
1 parent dbfdbc8 commit cb15ffe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pywaze/route_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
from typing import Any, Literal, TypedDict
import httpx
import re
import logging

logger = logging.getLogger(__name__)


class Coords(TypedDict):
Expand Down Expand Up @@ -201,6 +204,7 @@ def _check_response(response: httpx.Response) -> Any:
if response.is_success:
try:
response_json = response.json()
logger.debug("Response is: %s", response_json)
if "error" in response_json:
raise WRCError(response_json.get("error"))
return response_json
Expand Down

0 comments on commit cb15ffe

Please sign in to comment.