Documentation
¶
Overview ¶
Package runerr defines the runtime error raised while evaluating a request file: templates, queries, filters, predicates and captures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Span syntax.Span
Kind Kind
Assert bool
Final bool
Name string
Actual string
Expected string
TypeMismatch bool
Value string
Reason string
// Transport classifies a failed exchange for front ends: connect,
// resolve, timeout, tls, host-denied, canceled or other; empty when
// the error is not a transport failure. It never changes the kind,
// the message or a report.
Transport string
}
Error is a runtime error at a source span. Assert is set when the error was raised while evaluating an assert, which makes it an assert failure rather than a runtime error for the exit code. Final is set when retrying the entry cannot clear the error.
type Kind ¶
type Kind int
Kind identifies a runtime error. The comment of each kind names the Error fields it uses.
const ( // AssertFailure: Actual, Expected, TypeMismatch. AssertFailure Kind = iota // ExpressionInvalidType: Actual (value repr), Expected (expected kind). ExpressionInvalidType // FileReadAccess: Value (path). FileReadAccess UnauthorizedFileAccess // FilterDecode: Value (encoding). FilterDecode // FilterDateParsing: Value (date), Reason (format). FilterDateParsing // FilterInvalidEncoding: Value (encoding). FilterInvalidEncoding // FilterInvalidInputValue: Reason. FilterInvalidInputValue // FilterInvalidInputType: Actual, Expected (kind names). FilterInvalidInputType // FilterInvalidFormatSpecifier: Value (format). FilterInvalidFormatSpecifier // FilterMissingInput: no field. FilterMissingInput // HTTP is an error decoding the response: Value (description), Reason (message). HTTP // InvalidJSON: Value. InvalidJSON // InvalidRegex: no field. InvalidRegex // InvalidURL: Value (URL), Reason. InvalidURL // InvalidXPathEval: no field. InvalidXPathEval // NoQueryResult: no field. NoQueryResult // QueryHeaderNotFound: no field. QueryHeaderNotFound // QueryInvalidJSON: no field. QueryInvalidJSON // QueryInvalidJSONPath: Value (expression). QueryInvalidJSONPath // QueryInvalidXML: no field. QueryInvalidXML // UndefinedVariable: Value (name). UndefinedVariable // Unrenderable: Value (display of the value). Unrenderable // AssertStatus: Actual (status code). AssertStatus // AssertVersion: Actual (HTTP version). AssertVersion // AssertHeaderValue: Actual (header value). AssertHeaderValue // AssertBodyValue: Actual (body text). AssertBodyValue // AssertBodyDiff: Reason (first diff hunk, one "+"/"-"/" " prefixed // line per body line), Value (line of the body start, decimal). AssertBodyDiff // InvalidOptionValue: Name, Value, Reason. InvalidOptionValue // NoFilterResult: no field. NoFilterResult // PossibleLoggedSecret: no field. PossibleLoggedSecret // UnsupportedSecretType: Actual (kind of the value). UnsupportedSecretType // FileWriteAccess: Value (path), Reason. FileWriteAccess // BinaryOutput: no field. BinaryOutput // ContractViolation: Reason, Name (instance path, optional), Value // (spec pointer, optional). ContractViolation // Stream is a failure of a streamed entry (a WebSocket step, a // sondeStream field): Value (description), Reason (message). Stream // GRPC is a failed gRPC call (a status other than OK that the entry // does not check, descriptors, messages): Value (description), Reason // (message). GRPC // KindCount is the number of kinds; new kinds go above it. KindCount )
Runtime error kinds.
Click to show internal directories.
Click to hide internal directories.