Fix multiline list parsing and expose actionable HTTP failures
This commit is contained in:
1 parent
8b0d847776
commit
66ab7db3d8
11 files changed
+131
-12
No files matched your search
@@ -43,6 +43,8 @@ Primary sources used: `lynglib/src/commonMain/kotlin/net/sergeych/lyng/{Parser,T
|
||||
|
||||
## 3. Literals and Core Expressions
|
||||
- Scalars: `null`, `true`, `false`, `void`.
|
||||
- List literals allow multiline layout, comments between entries and trailing commas.
|
||||
Newlines before the closing `]` are whitespace, including in nested and empty lists.
|
||||
- List literal: `[a, b, c]`, spreads with `...`.
|
||||
- Spread positions: beginning, middle, end are all valid: `[...a]`, `[0, ...a, 4]`, `[head, ...mid, tail]`.
|
||||
- Spread source must be a `List` at runtime (non-list spread raises an error).
|
||||
|
||||
@@ -194,3 +194,17 @@ val allowLocalOnly = object : HttpAccessPolicy {
|
||||
- **Windows native:** supported via the Ktor WinHttp client backend
|
||||
- **Apple native:** supported via the Ktor Darwin client backend
|
||||
- **Other targets:** may report unsupported; use `Http.isSupported()` before relying on it
|
||||
|
||||
## Request failure diagnostics
|
||||
|
||||
Transport exceptions report the request method and target, a category, the
|
||||
underlying exception/cause chain, and recovery advice. Query strings and userinfo
|
||||
are redacted from the diagnostic target. Categories are `HTTP_TLS_FAILED`,
|
||||
`HTTP_TIMEOUT`, `HTTP_DNS_FAILED`, `HTTP_CONNECTION_FAILED` and
|
||||
`HTTP_REQUEST_FAILED`. Permission denials are `HTTP_ACCESS_DENIED`; redirect
|
||||
limit errors retain `HTTP_REDIRECT_LIMIT_EXCEEDED`.
|
||||
|
||||
`HTTP_TLS_FAILED` means the handshake failed before an HTTP response. Do not
|
||||
retry the same URL unchanged; use another source. A remote TLS fatal alert is
|
||||
not a Lyng syntax error. Non-2xx responses remain ordinary response objects, and
|
||||
request cancellation propagates rather than becoming a generic HTTP error.
|
||||
Reference in new issue
Block a user