tickets
All repositories: gitoria
1.2 KB
// #285: a fault abandons this request handler; Error supplies its answer.import { NativeHttpServer, Response } from 'hl:http1'import { env } from 'hl:proc'port = toNumber(env('HL_TEST_PORT'))s = new NativeHttpServer(port = port)on s.request(Hybrid req) {if (req.path == '/health') { return new Response('healthy') }hlOnFault((String located) => { echo('hook') })if (req.path == '/sent') { req.respond.call('send', 202, 'sent') }hlError('route:' + req.path)echo('UNREACHABLE')}on Error(Hybrid e) {if (e.phase != 'event' || e.request != true) { hlError('wrong request context') }echo('handled')if (e.message.includes('/fatal')) { hlError('error-handler-fault') }if (e.message.includes('/text')) { return 'fallback' }if (e.message.includes('/json')) { return { ok = true items = [1, 2] } }if (e.message.includes('/status')) {return new Response('unavailable', { status = 503 headers = { 'X-Fallback' = 'yes' } })}if (e.message.includes('/bytes')) { return new Response(toBytes('raw')) }if (e.message.includes('/empty')) { return '' }if (e.message.includes('/false')) { return false }if (e.message.includes('/zero')) { return 0 }if (e.message.includes('/sent')) { return 'second' }if (e.message.includes('/null')) { return null }}
Branches
Latest commits
- ecd7e226|||PR Consolidate login and move handler logic into topic libraries (partial)mre
- 6dea1c60Merge branch 'r35-day72' into mainTickets
- 7bcfdc22|||PR drop worker edits to conductor recordsmre
- 2617b6ee|||PR dialogs: host flag cleared on close, dialog gate (tickets#40)mre
- 6e701371|||PR record partial day72 dialog validationmre
- b9fb9a91|||PR bind ticket dialog visibility to member flagsmre
- 0788e65f|||PR re-vendor Hybriel day72mre
- e2a6bdcfMerge branch 'records-t35' into mainTickets
- d8d54df1|||PR records: R35 day72 + #40mre
- 8a7f475aMerge branch 'records-t33' into mainTickets
- e685d0c2|||PR records: PROCEDURES merge callmre
- b42aff2b|||PR records: GO 2026-11-23, workers L33 O34, PROCEDURES.mdmre
- ed091d44Merge branch 'records' into mainTickets
- 180c0cdb|||PR records: ticket move live (M32), hybriel#439mre
- 497cae7bMerge branch 'm32-move' into mainTickets
- 772e0696|||PR Allow project admins to move tickets between their projectsmre
- be92a560Merge branch 'records' into mainTickets
- 0daf2ea8|||PR records: PR-only workflow, #50 donemre
- 0185d0b6Log PR 1 deploymre
- f5bf16e2Mission 031: deploy PR 1mre