Workers P4 Endprüfung W1: 502/504 beim Warten heißen bei reply, approve-preview und start-build „Kann gesendet sein“
Die Unsicherheits-Meldung (D14) galt nur für status 0. Eine Fehlerseite des Proxys (502, 504) zeigte „Der Hustler-Dienst ist gerade nicht erreichbar.“, obwohl der Dienst weiterarbeitet und die Mail schon hinausgegangen sein kann. workersApi.js exportiert UNCERTAIN_STATUS = [0, 502, 504]; actionErrorText prüft ihn (503, 429, 4xx und 500 bleiben unverändert, ebenso ein Satz des Dienstes unter 502). ACTION_TIMEOUT_MS steigt auf 65 s, damit der Client nicht gleichauf mit dem proxy_read_timeout (60 s) läuft und ein 504 zuerst ankommt. Tests über createWorkersApi mit Fehlerseiten für alle acht Aktionen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5138efd2bf
commit
1536a3bbc1
4 files changed
+68
-31
No files matched your search
@@ -341,7 +341,7 @@ test('rowModel canApprovePreview und previewHref: nur Art vorschau_freigabe, gle
|
||||
'https://www.project.webklar.com/AAA/', 'https://project.webklar.com/AAA/', '//entwurf.project.webklar.com/AAA/', '', null, undefined, 7]) {
|
||||
m = rowModel(freigabe({ sourceUrl: bad }), T32_CTX)
|
||||
assert.equal(m.previewHref, null, String(bad))
|
||||
assert.equal(m.canApprovePreview, true, String(bad)) // der Knopf bleibt, die Adresse fehlt nur; der Dienst prüft die Freigabe selbst
|
||||
assert.equal(m.canApprovePreview, true, String(bad)) // das Modell bleibt bei true; die Zeile sperrt den Knopf ohne gültige Adresse (Endprüfung W5, workersPultUi.test.mjs)
|
||||
}
|
||||
assert.equal(rowModel(freigabe({ sourceUrl: 'HTTPS://ENTWURF.PROJECT.WEBKLAR.COM/AAA/' }), T32_CTX).previewHref, PREVIEW_URL) // vom Browser normalisiert
|
||||
// abgeschlossen bleibt die Adresse im Modell (die Zeile braucht sie dort nicht)
|
||||
@@ -418,6 +418,19 @@ test('actionErrorText (D14): bei reply, approve-preview und start-build heißt
|
||||
for (const action of ['reply', 'approve-preview', 'start-build']) assert.equal(actionErrorText(down, action), UNCERTAIN_TEXT, action)
|
||||
// alle anderen Aktionen und alle echten Antworten des Dienstes behalten ihren Satz
|
||||
for (const action of ['paste', 'claim', 'sent', 'discard', 'done', undefined]) assert.equal(actionErrorText(down, action), down.message, String(action))
|
||||
// W1: auch die Fehlerseite des Proxys beim Warten (502/504, Meldung „nicht erreichbar“) lässt offen, ob der Dienst fertig wurde; 503 (kein Upstream) und der Rest nicht
|
||||
for (const status of [502, 504]) {
|
||||
const gateway = Object.assign(new Error('Der Hustler-Dienst ist gerade nicht erreichbar.'), { status })
|
||||
for (const action of ['reply', 'approve-preview', 'start-build']) assert.equal(actionErrorText(gateway, action), UNCERTAIN_TEXT, `${action} ${status}`)
|
||||
for (const action of ['paste', 'claim', 'sent', 'discard', 'done', undefined]) assert.equal(actionErrorText(gateway, action), gateway.message, `${action} ${status}`)
|
||||
// ein Satz des Dienstes unter demselben Status gehört dem Dienst (502 „Anmeldedienst nicht erreichbar.“ kommt vor der Aktion)
|
||||
const sentence = Object.assign(new Error('Anmeldedienst nicht erreichbar.'), { status })
|
||||
assert.equal(actionErrorText(sentence, 'reply'), 'Anmeldedienst nicht erreichbar.', String(status))
|
||||
}
|
||||
for (const status of [503, 429, 500, 401, 400, 409]) {
|
||||
const other = Object.assign(new Error('Der Hustler-Dienst ist gerade nicht erreichbar.'), { status })
|
||||
assert.equal(actionErrorText(other, 'reply'), other.message, String(status))
|
||||
}
|
||||
const conflict = Object.assign(new Error('Wird schon von einem Kollegen bearbeitet.'), { status: 409 })
|
||||
assert.equal(actionErrorText(conflict, 'reply'), 'Wird schon von einem Kollegen bearbeitet.')
|
||||
assert.equal(actionErrorText(Object.assign(new Error('Anfrage zu groß.'), { status: 413 }), 'reply'), 'Anfrage zu groß.')
|
||||
|
||||
Reference in new issue
Block a user