docbrown/app/labor/error_message_cleaner.rb
Mohab Abd El-Dayem 2c80e9da42 Make The Default Email An Enviroment Variable. (#4677)
* Make the default email an enviroment variable

* Added spaces in Envfile for readability
2019-11-01 09:03:06 -04:00

15 lines
469 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 #{ApplicationConfig['DEFAULT_SITE_EMAIL']} if you are having trouble."
else
error_message
end
end
end