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

Function classifyErrorCodeOrEmpty

server/transient_test.go:434–439  ·  view source on GitHub ↗

classifyErrorCodeOrEmpty is a test helper to surface the computed SQLSTATE in failure messages without crashing on nil errors.

(err error)

Source from the content-addressed store, hash-verified

432// classifyErrorCodeOrEmpty is a test helper to surface the computed
433// SQLSTATE in failure messages without crashing on nil errors.
434func classifyErrorCodeOrEmpty(err error) string {
435 if err == nil {
436 return "(nil)"
437 }
438 return classifyErrorCode(err)
439}
440
441// TestClassifyErrorCodeAgainstRealDuckDB drives queries that reliably
442// produce each error prefix the classifier branches on, against a real

Callers 1

TestIsUserQueryErrorFunction · 0.85

Calls 1

classifyErrorCodeFunction · 0.85

Tested by

no test coverage detected