From c20cf0fd676f18ab8c2490959fc5be8690570f55 Mon Sep 17 00:00:00 2001 From: Mark Laing Date: Wed, 6 Nov 2024 09:23:52 +0000 Subject: [PATCH] lxd/response: Delete database errors from response package. Signed-off-by: Mark Laing --- lxd/response/smart_linux.go | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 lxd/response/smart_linux.go diff --git a/lxd/response/smart_linux.go b/lxd/response/smart_linux.go deleted file mode 100644 index 2514df5c1c80..000000000000 --- a/lxd/response/smart_linux.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build linux && cgo && !agent - -package response - -import ( - "net/http" - - "github.com/canonical/go-dqlite/v3/driver" - "github.com/mattn/go-sqlite3" -) - -// Populates error slices with Linux specific error types for use with SmartError(). -func init() { - httpResponseErrors[http.StatusConflict] = append(httpResponseErrors[http.StatusConflict], sqlite3.ErrConstraintUnique) - httpResponseErrors[http.StatusServiceUnavailable] = append(httpResponseErrors[http.StatusServiceUnavailable], driver.ErrNoAvailableLeader) -}