docbrown/app/labor/error_message_cleaner.rb
Michael Kohl 728a05c476 Move from env variables to SiteConfig (#5385) [deploy]
* Move from env variables to SiteConfig

Related to #5384

This PR only deals with the first remaining part outlined in the issue, starting to use existing SiteConfig keys instead of the env variables.

* Restore Envfile to original version for now
2020-01-07 16:36:24 -05:00

15 lines
459 B
Ruby

class ErrorMessageCleaner
attr_accessor :error_message
def initialize(error_message)
@error_message = error_message
end
def clean
if error_message.include? "expected key while parsing a block mapping at line"
"There was a problem parsing the front-matter YAML. Perhaps you need to escape a quote or a colon or something. Email #{SiteConfig.default_site_email} if you are having trouble."
else
error_message
end
end
end