Use `org.apache.sling.servlets.post.HtmlResponse` to emit error messages to end users. That way they can often solve issues on their own instead of reaching out to IT to ask them to check the log. For example see its usage in https://github.com/orbinson/aem-dictionary-translator/blob/83c3a09e7cb7e283b2aa105e9f9ace78a117d3a0/core/src/main/java/be/orbinson/aem/dictionarytranslator/servlets/action/ExportDictionaryServlet.java#L82-L84