boostorg / website-v2

New Boost website
https://boost.io
Boost Software License 1.0
8 stars 13 forks source link

approving news entry error #1428

Closed sdarwin closed 1 week ago

sdarwin commented 1 week ago

When approving a news entry, a 500 server error occurs. See attached screenshot. This has happened before.

File "/venv/lib/python3.11/site-packages/anymail/backends/base_requests.py", line 119, in raise_for_status
    raise AnymailRequestsAPIError(
anymail.exceptions.AnymailRequestsAPIError: Mailgun API response 400 (Bad Request):
{
  "message": "to parameter is missing"
}

Who is the website sending an email to? The news entry author or the admin(s)?

The approval eventually succeeds. So not a 'critical' error.

Image

sdarwin commented 1 week ago

Full stack trace:

Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/contrib/auth/mixins.py", line 73, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/contrib/auth/mixins.py", line 135, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch
    return handler(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/news/views.py", line 277, in post
    send_email_news_posted(request=request, entry=entry)
  File "/code/news/notifications.py", line 121, in send_email_news_posted
    ).send()
      ^^^^^^
  File "/venv/lib/python3.11/site-packages/django/core/mail/message.py", line 299, in send
    return self.get_connection(fail_silently).send_messages([self])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/anymail/backends/base.py", line 117, in send_messages
    sent = self._send(message)
           ^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/anymail/backends/base_requests.py", line 51, in _send
    return super()._send(message)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/anymail/backends/base.py", line 147, in _send
    response = self.post_to_esp(payload, message)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/anymail/backends/base_requests.py", line 108, in post_to_esp
    self.raise_for_status(response, payload, message)
  File "/venv/lib/python3.11/site-packages/anymail/backends/mailgun.py", line 59, in raise_for_status
    super().raise_for_status(response, payload, message)
  File "/venv/lib/python3.11/site-packages/anymail/backends/base_requests.py", line 119, in raise_for_status
    raise AnymailRequestsAPIError(
anymail.exceptions.AnymailRequestsAPIError: Mailgun API response 400 (Bad Request):
{
  "message": "to parameter is missing"
}