Skip to content

Conversation

@tomek-ac
Copy link

@tomek-ac tomek-ac commented Nov 13, 2023

With :network strategy the gem doesn't fail when the stylesheet doesn't exist at given url (404).
This results in emails being sent without styling.

We would like the gem to raise an exception if for whatever reason our CDN styles are not accessible.

In the proposed PR the loader will return a response only when the response was successful (2xx). Otherwise it will return nil which will result in Premailer::Rails::CSSHelper::FileNotFound being raised.

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

Successfully merging this pull request may close these issues.

1 participant