Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending errors lead to argument errors #648

Open
tillsc opened this issue Nov 4, 2022 · 0 comments
Open

Sending errors lead to argument errors #648

tillsc opened this issue Nov 4, 2022 · 0 comments

Comments

@tillsc
Copy link

tillsc commented Nov 4, 2022

When sending an email fails, bamoo tries to raise an exeption. E.g. this happens here:
https://github.com/thoughtbot/bamboo/blob/f29d4984eeb836680acd425b8d44d4d3c7edb606/lib/bamboo/mailer.ex#L234

But error must not always be a string. In our case error sometimes is a Tuple. E.g. like:

{:permanent_failure, '...', "550 5.7.64 TenantAttribution; Relay Access Denied [...]\r\n"})

This leads to an argument error:

ArgumentError raise/1 and reraise/2 expect a module name, string or exception as the first argument, got: ...

Bamboo should ensure to raise strings only. E.g. by using inspect like raise inspect(error).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant