--- /dev/null
+'use strict';
+
+const { TemplateHelper: th } = require('@squeep/html-template-helper');
+
+function mainContent() {
+ return [
+ `<section>
+\t<a href="./login">Try Again?</a>
+</section>`,
+ ];
+}
+
+/**
+ * Render any errors from attempting IndieAuth.
+ * @param {Object} ctx
+ * @param {String[]} ctx.errors
+ * @param {Object} options
+ * @param {Object} options.manager
+ * @param {String} options.manager.pageTitle
+ * @param {Object} options.dingus
+ * @param {String} options.dingus.selfBaseUrl
+ * @returns {String}
+ */
+module.exports = (ctx, options) => {
+ const htmlOptions = {
+ pageTitle: options.manager.pageTitle,
+ logoUrl: options.manager.logoUrl,
+ footerEntries: options.manager.footerEntries,
+ errorContent: [
+ '<p>Problems were encountered while trying to authenticate your profile URL.</p>',
+ ],
+ };
+ // Ensure there is always an error to report, even if we do not have one, as we ended up here somehow.
+ if (!ctx.errors || !ctx.errors.length) {
+ ctx.errors = [
+ 'Unknown Error — we are not sure what just happened',
+ ];
+ }
+ return th.htmlPage(2, ctx, htmlOptions, mainContent());
+};
\ No newline at end of file