adrgs / requestrepo

Analyze HTTP and DNS requests and create custom DNS records for your subdomain
https://requestrepo.com
MIT License
372 stars 19 forks source link

Internal Server Error in /api/update_dns #37

Closed adrgs closed 6 months ago

adrgs commented 6 months ago

Just noticed, need to fix this

adrgs commented 6 months ago
  File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
  File "/app/app.py", line 119, in update_dns
    await redis.set(f"dns:{subdomain}", json.dumps(final_records))
  File "/usr/local/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/local/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type DnsRecord is not JSON serializable
adrgs commented 6 months ago

Fixed in #38