Skip to content

Commit

Permalink
Update error responses to match other modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel McKnight committed Apr 10, 2024
1 parent 2e698a4 commit 000d88b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neon_email_proxy/email_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ def handle_send_email(self, **kwargs):
LOG.warning(f"{kwargs['subject']} not in allowed subjects: "
f"{self._allowed_subjects}")
return {"success": False,
"reason": "Invalid subject"}
"error": "Invalid subject"}
send_ai_email(kwargs["subject"], kwargs["body"],
kwargs["recipient"], att_files,
kwargs.get("email_config"))
return {"success": True}
except Exception as e:
LOG.error(e)
return {"success": False,
"reason": str(e)}
"error": str(e)}

def handle_email_request(self,
channel: pika.channel.Channel,
Expand Down

0 comments on commit 000d88b

Please sign in to comment.