Package errtype provides a number of concrete types which are used by the
cloudsqlconn package.
ConfigError
typeConfigErrorstruct{// contains filtered or unexported fields}
ConfigError represents an incorrect request by the user. Config errors
usually indicate a semantic error (e.g., the instance connection name is
malformed, the SQL instance does not support the requested IP type, etc.)
ConfigError's should not be retried.
typeDialErrorstruct{// Err is the underlying error and may be nil.Errerror// contains filtered or unexported fields}
DialError represents a problem that occurred when trying to dial a SQL
instance (e.g., a failure to set the keep-alive property, a TLS handshake
failure, a missing certificate, etc.). DialError's are often network-related
and can be retried.
typeRefreshErrorstruct{// Err is the underlying error and may be nil.Errerror// contains filtered or unexported fields}
RefreshError means that an error occurred during the background
refresh operation. In general, this is an unexpected error caused by
an interaction with the API itself (e.g., missing certificates,
invalid certificate encoding, region mismatch with the requested
instance connection name, etc.). RefreshError's usually can be retried.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-05 UTC."],[[["\u003cp\u003eThis page details the \u003ccode\u003eerrtype\u003c/code\u003e package within the \u003ccode\u003ecloudsqlconn\u003c/code\u003e library, which contains various concrete error types used by the \u003ccode\u003ecloudsqlconn\u003c/code\u003e package.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConfigError\u003c/code\u003e type signifies errors resulting from incorrect user requests, such as malformed instance connection names, and should not be retried.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDialError\u003c/code\u003e type represents errors that occur while trying to connect to a SQL instance, often due to network issues, and these can typically be retried.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRefreshError\u003c/code\u003e type indicates an error occurred during the background refresh operation, typically due to unexpected API interactions, which can also usually be retried.\u003c/p\u003e\n"],["\u003cp\u003eMultiple versions of this package are available, ranging from version 0.1.0 to the latest version 1.16.0, and all of them are accessible through the links provided.\u003c/p\u003e\n"]]],[],null,["# Package cloud.google.com/go/cloudsqlconn/errtype (v1.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.16.0 (latest)](/go/docs/reference/cloud.google.com/go/cloudsqlconn/latest/errtype)\n- [1.15.0](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.15.0/errtype)\n- [1.14.2](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.14.2/errtype)\n- [1.13.2](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.13.2/errtype)\n- [1.12.1](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.12.1/errtype)\n- [1.11.1](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.11.1/errtype)\n- [1.10.1](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.10.1/errtype)\n- [1.9.0](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.9.0/errtype)\n- [1.8.1](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.8.1/errtype)\n- [1.7.0](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.7.0/errtype)\n- [1.6.0](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.6.0/errtype)\n- [1.5.2](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.5.2/errtype)\n- [1.4.3](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.4.3/errtype)\n- [1.3.0](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.3.0/errtype)\n- [1.2.4](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.2.4/errtype)\n- [1.1.1](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.1.1/errtype)\n- [1.0.1](/go/docs/reference/cloud.google.com/go/cloudsqlconn/1.0.1/errtype)\n- [0.5.2](/go/docs/reference/cloud.google.com/go/cloudsqlconn/0.5.2/errtype)\n- [0.4.0](/go/docs/reference/cloud.google.com/go/cloudsqlconn/0.4.0/errtype)\n- [0.3.1](/go/docs/reference/cloud.google.com/go/cloudsqlconn/0.3.1/errtype)\n- [0.2.0](/go/docs/reference/cloud.google.com/go/cloudsqlconn/0.2.0/errtype)\n- [0.1.0](/go/docs/reference/cloud.google.com/go/cloudsqlconn/0.1.0/errtype) \n**Note:** To get more information about this package, such as access to older versions, view [this package on pkg.go.dev](https://pkg.go.dev/cloud.google.com/go/cloudsqlconn/errtype). \n\u003cbr /\u003e\n\nPackage errtype provides a number of concrete types which are used by the\ncloudsqlconn package. \n\nConfigError\n-----------\n\n type ConfigError struct {\n \t// contains filtered or unexported fields\n }\n\nConfigError represents an incorrect request by the user. Config errors\nusually indicate a semantic error (e.g., the instance connection name is\nmalformed, the SQL instance does not support the requested IP type, etc.)\nConfigError's should not be retried. \n\n### func NewConfigError\n\n func NewConfigError(msg, cn https://pkg.go.dev/builtin#string) *#cloud_google_com_go_cloudsqlconn_errtype_ConfigError\n\nNewConfigError initializes a ConfigError. \n\n### func (ConfigError) Error\n\n func (e #cloud_google_com_go_cloudsqlconn_errtype_ConfigError) Error() https://pkg.go.dev/builtin#string\n\nDialError\n---------\n\n type DialError struct {\n\n \t// Err is the underlying error and may be nil.\n \tErr https://pkg.go.dev/builtin#error\n \t// contains filtered or unexported fields\n }\n\nDialError represents a problem that occurred when trying to dial a SQL\ninstance (e.g., a failure to set the keep-alive property, a TLS handshake\nfailure, a missing certificate, etc.). DialError's are often network-related\nand can be retried. \n\n### func NewDialError\n\n func NewDialError(msg, cn https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error) *#cloud_google_com_go_cloudsqlconn_errtype_DialError\n\nNewDialError initializes a DialError. \n\n### func (\\*DialError) Error\n\n func (e *#cloud_google_com_go_cloudsqlconn_errtype_DialError) Error() https://pkg.go.dev/builtin#string\n\n### func (\\*DialError) Unwrap\n\n func (e *#cloud_google_com_go_cloudsqlconn_errtype_DialError) Unwrap() https://pkg.go.dev/builtin#error\n\nRefreshError\n------------\n\n type RefreshError struct {\n\n \t// Err is the underlying error and may be nil.\n \tErr https://pkg.go.dev/builtin#error\n \t// contains filtered or unexported fields\n }\n\nRefreshError means that an error occurred during the background\nrefresh operation. In general, this is an unexpected error caused by\nan interaction with the API itself (e.g., missing certificates,\ninvalid certificate encoding, region mismatch with the requested\ninstance connection name, etc.). RefreshError's usually can be retried. \n\n### func NewRefreshError\n\n func NewRefreshError(msg, cn https://pkg.go.dev/builtin#string, err https://pkg.go.dev/builtin#error) *#cloud_google_com_go_cloudsqlconn_errtype_RefreshError\n\nNewRefreshError initializes a RefreshError. \n\n### func (\\*RefreshError) Error\n\n func (e *#cloud_google_com_go_cloudsqlconn_errtype_RefreshError) Error() https://pkg.go.dev/builtin#string\n\n### func (\\*RefreshError) Unwrap\n\n func (e *#cloud_google_com_go_cloudsqlconn_errtype_RefreshError) Unwrap() https://pkg.go.dev/builtin#error"]]