Funktionen: Stripe-Sitzungs-ID bis 128 Zeichen, keine Rohmeldungen beim Bestellen
Live-Fehler: cs_live-Sitzungs-IDs (~66 Zeichen) passten nicht in das Feld portalFeatures.stripeSessionId (64), die Bestellung brach nach dem Anlegen der Stripe-Sitzung ab und der Kunde sah die Appwrite-Meldung. - Setup-Skript: Feld 128 Zeichen, bestehendes Feld wird per ensureStringSize vergroessert - Fehler von Appwrite oder unerwartete Fehler: Log + verstaendlicher Hinweis Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4b7f73abba
commit
b45108c1de
4 files changed
+54
-7
No files matched your search
@@ -395,3 +395,13 @@ test('ticket_details_nennen_die_anleitung', () => {
|
||||
const doc = [...aw.docs('workorders').values()].find((t) => String(t.topic).startsWith('News-Pinnwand einbauen'))
|
||||
assert.ok(doc.details.includes('Anleitung: docs/funktionen/news-einbau.md (Repo Webklar-Kundenbereich)'))
|
||||
})
|
||||
|
||||
// Live-Fehler 30.09.2026: Appwrite lehnte die (zu lange) Sitzungs-ID ab, der Kunde sah die rohe Meldung
|
||||
test('checkout_datenbankfehler_ohne_rohe_meldung', async () => {
|
||||
aw.seed('websiteProjects', { $id: 'p-db', customerId: 'c1', projectName: 'Eisdiele' })
|
||||
aw.failNext({ collection: 'portalFeatures', method: 'PATCH', status: 400, message: 'Invalid document structure: Attribute "stripeSessionId" has invalid type.' })
|
||||
const res = await checkout('p-db')
|
||||
assert.equal(res.status, 500, JSON.stringify(res.body))
|
||||
assert.doesNotMatch(res.body.error, /Invalid document structure|stripeSessionId/)
|
||||
assert.match(res.body.error, /Bestellung konnte gerade nicht gestartet werden/)
|
||||
})
|
||||
@@ -299,3 +299,15 @@ test('schema_funktionen_news', async () => {
|
||||
assert.ok(news.includes(k), `newsPosts.${k}`)
|
||||
}
|
||||
})
|
||||
|
||||
// Stripe-Checkout-IDs im Live-Modus sind ~66 Zeichen lang (cs_live_ + 58); 64 war zu knapp
|
||||
test('schema_stripe_session_id_lang_genug', async () => {
|
||||
const { readFileSync } = await import('node:fs')
|
||||
const src = readFileSync(new URL('../scripts/setup-abo-collections.mjs', import.meta.url), 'utf8')
|
||||
const block = src.slice(src.indexOf("'portalFeatures',"))
|
||||
const m = block.match(/key: 'stripeSessionId', size: (\d+)/)
|
||||
assert.ok(m, 'stripeSessionId im portalFeatures-Block')
|
||||
assert.ok(Number(m[1]) >= 128, `stripeSessionId size ${m[1]} < 128`)
|
||||
// bestehendes Feld in Produktion wird per Groessen-Update angehoben
|
||||
assert.match(src, /ensureStringSize\('portalFeatures', 'stripeSessionId', 128\)/)
|
||||
})
|
||||
Reference in new issue
Block a user