Changeset ec288dc in Klonkt for src/views/pages/paid-result.ejs


Ignore:
Timestamp:
07/21/2026 03:11:39 AM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
dede82e
Parents:
c7a211d
git-author:
Robin <roboburr@…> (07/21/2026 03:11:37 AM)
git-committer:
Robin <roboburr@…> (07/21/2026 03:11:39 AM)
Message:

Debug: show why a patron is rejected on the "Nog geen supporter" page

We are debugging boiert.eu blind (it's a self-hosted instance we can't see
the logs of), so surface the non-identifying diagnosis on the result page
itself. verifyPatron now always returns { status, cents, diag } after it
reaches Patreon, where diag is a breadcrumb: the configured campaign_id, the
memberships Patreon returned (campaign:status:cents each), and what got
picked. The paid-result page prints it small under the buttons so the tester
can read it and report back. No identity (name/email) is included or stored.

Once the cause is known this can be removed again.

Changed files:
src/services/PaidPatreonService.js

  • verifyPatron returns {status,cents,diag}; null only on hard misconfig

src/routes/paid.js

  • pass diag as debug to the notpatron/tier result page

src/views/pages/paid-result.ejs

  • small "diagnose:" line when debug is present

-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/paid-result.ejs

    rc7a211d rec288dc  
    3434      <% } %>
    3535    </div>
     36
     37    <% if (typeof debug !== 'undefined' && debug) { %>
     38      <p class="pr-diag">diagnose: <code><%= debug %></code></p>
     39    <% } %>
    3640  </div>
    3741</section>
     
    4650  .pr-btn { display: inline-block; padding: 11px 20px; border-radius: 10px; background: var(--accent,#6b8f71); color: #fff; text-decoration: none; font-weight: 600; }
    4751  .pr-btn-ghost { background: transparent; color: var(--ink,#222); border: 1px solid color-mix(in srgb, var(--ink,#000) 22%, transparent); }
     52  .pr-diag { margin: 18px 0 0; font-size: 12px; opacity: .6; word-break: break-all; }
     53  .pr-diag code { font-family: ui-monospace, monospace; }
    4854</style>
Note: See TracChangeset for help on using the changeset viewer.