MCPcopy Create free account
hub / github.com/PostHog/duckgres / CodedError

Struct CodedError

transpiler/transform/errors.go:6–9  ·  view source on GitHub ↗

CodedError is a transform-detected error that carries an explicit PostgreSQL SQLSTATE. conn_errors.go reads the code via the SQLState() method when sending the error to the client; errors without a code default to 42704.

Source from the content-addressed store, hash-verified

4// SQLSTATE. conn_errors.go reads the code via the SQLState() method when sending the
5// error to the client; errors without a code default to 42704.
6type CodedError struct {
7 Code string
8 Message string
9}
10
11func (e *CodedError) Error() string { return e.Message }
12func (e *CodedError) SQLState() string { return e.Code }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected