Fix ApiResponse.content error and add API base URL logging
- Changed resp.content to resp.text in register_view (ApiResponse has no content attribute) - Added logging for API base URL to debug 404 errors - This should help identify why API returns 404 for registration endpoint
This commit is contained in:
parent
f27ebd9f29
commit
4e8807ba35
@ -89,10 +89,11 @@ def register_view(request):
|
||||
logger.warning(f"[REGISTER_VIEW] API payload keys: {list(payload.keys())}")
|
||||
payload_debug = {k: v for k, v in payload.items() if k != 'avatar'}
|
||||
logger.warning(f"[REGISTER_VIEW] API payload (без avatar): {payload_debug}")
|
||||
logger.warning(f"[REGISTER_VIEW] API base URL: {api.cfg.base_url}")
|
||||
|
||||
resp = api.post("v1/auth/register/", json=payload)
|
||||
logger.warning(f"[REGISTER_VIEW] API response status: {resp.status}")
|
||||
resp_data = resp.json if resp.json else resp.content
|
||||
resp_data = resp.json if resp.json else resp.text
|
||||
logger.warning(f"[REGISTER_VIEW] API response: {resp_data}")
|
||||
|
||||
if resp.status == 201:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user