tickets
All repositories: gitoria
2.8 KB
// lib/problems.hl — WHAT THE ERROR PAGES SAY (tickets#42). /connect and /login/callback are function routes: they decide, they do not draw.// A refusal redirects to a PAGE of the app (components/problem.hl: the same shell, header and theme) and names the reason by a SHORT CODE in the// path (`/login/failed/<code>`, `/connect/failed/<code>`); the sentence is chosen HERE from the code, so no text of the URL (or of ident, or of// the app asking to connect) is ever rendered: an unknown code gets the general sentence.// the sentence and the heading of a code: { title, text, back, backText }static problemOf = (code) => {let title = 'Something went wrong'let text = 'That did not work. Please try again.'let back = '/'let backText = 'back to the tickets'if (code == 'login-method') { title = 'Login failed' text = 'The login return only accepts a normal page visit.' }if (code == 'login-no-code') { title = 'Login failed' text = 'Ident sent no login code. Please sign in again.' }if (code == 'login-refused') { title = 'Login failed' text = 'Ident did not accept the login code. Please sign in again.' }if (code == 'login-no-answer') { title = 'Login failed' text = 'Ident did not answer. Please try again in a moment.' }if (code == 'login-not-set-up') { title = 'Login failed' text = 'Login is not set up on this server.' }if (code == 'login-no-user') { title = 'Login failed' text = 'Your user could not be stored. Please try again.' }if (code == 'login-invite') { title = 'Invite failed' text = 'The invite could not be used. It may be used up, or meant for a project that does not exist any more. Ask for a new one.' }if (code == 'connect-method') { title = 'Connect failed' text = 'The connection request only accepts a normal page visit.' }if (code == 'connect-refused') { title = 'Connect failed' text = 'The app sent a connection request that is not valid: its name or its return address was not accepted. Start again from the app.' }if (code == 'connect-busy') { title = 'Connect failed' text = 'Too many connection requests are waiting. Try again in a few minutes.' }if (code == 'connect-store') { title = 'Connect failed' text = 'The connection request could not be stored. Please try again.' }return { title = title text = text back = back backText = backText }}// the code an ident exchange error stands for (users.hl exchangeCode answers its reason as text)static loginCodeOf = (error) => {if (error == 'ident did not answer') { return 'login-no-answer' }if (error != null && error.indexOf('not set up') >= 0) { return 'login-not-set-up' }return 'login-refused'}// the code a refused connection request stands for (connections.hl createRequest)static connectCodeOf = (r) => {if (r.busy == true) { return 'connect-busy' }if (r.error != null && r.error.startsWith('could not store')) { return 'connect-store' }return 'connect-refused'}
Branches
Latest commits
- e843ff7cOne-time purge of miserit-anthar#94 (#94, identity rule): idempotent step in lib/migrate.hl, fixture gate tests/purge94.mjsmre
- 506a4efdmission 028: #94, identity rulemre
- 78c7f48eRefine mpackdb holdmre
- 3d7d89c8Record mpackdb hold until day38mre
- f1bf7195#51 done; my subscription idmre
- 9870b945status: #51 proof greenmre
- e92173c6log: #51 live push proofmre
- 72d87041log: Hermes push livemre
- 1d69bf7dTickets conductor: park until Hermes pushmre
- 80d8cfd1Tickets conductor: #51 livemre
- 61641dd9Complete subscriptions deployment evidencemre
- c980856cRecord successful subscriptions deployment and live checksmre
- 4b4710adMerge branch 's51-subscriptions'mre
- a731ef7eTickets conductor: S51 reviewed, deploy stepmre
- b487b05aRecord verified direct push protocol handoffmre
- 74e34cc3Verify encrypted push secrets and direct push retry semanticsmre
- a1ac5cd0Push subscription notices directly to signed HyperConductor chat endpointsmre
- d662ad27Remove superseded waker service for direct chat push protocolmre
- c0ac927aTickets conductor: S51 redo for push protocolmre
- ff2e8701Finalize subscription build verification and handoff reportmre