From 961e841bd761e738b5e4a25693881174c0dd3ffb Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Wed, 28 Apr 2021 11:06:17 +0300 Subject: [PATCH] all: fix error naming errs.Class should not contain "error" in the name, since that causes a lot of stutter in the error logs. As an example a log line could end up looking like: ERROR node stats service error: satellitedbs error: node stats database error: no rows Whereas something like: ERROR nodestats service: satellitedbs: nodestatsdb: no rows Would contain all the necessary information without the stutter. Change-Id: I7b7cb7e592ebab4bcfadc1eef11122584d2b20e0 --- certificate/authorization/authorizations.go | 4 ++-- certificate/authorization/db.go | 6 +++--- certificate/authorization/endpoint.go | 2 +- certificate/authorization/service.go | 2 +- certificate/peer.go | 2 +- cmd/certificates/verify.go | 2 +- cmd/identity/identity.go | 2 +- cmd/inspector/main.go | 8 ++++---- multinode/console/controllers/nodes.go | 2 +- multinode/console/controllers/payouts.go | 2 +- multinode/console/server/server.go | 2 +- multinode/multinodedb/database.go | 2 +- multinode/multinodedb/dbx/gen.go | 2 +- multinode/multinodedb/members.go | 2 +- multinode/multinodedb/nodes.go | 2 +- multinode/nodes/service.go | 2 +- multinode/payouts/service.go | 2 +- private/migrate/versions.go | 6 +++--- private/nodeoperator/operator.go | 2 +- private/post/message.go | 2 +- private/quic/common.go | 2 +- private/revocation/db.go | 4 ++-- private/server/common.go | 2 +- private/version/checker/client.go | 4 ++-- satellite/accounting/common.go | 2 +- satellite/accounting/projectlimitcache.go | 6 +++--- satellite/accounting/projectusage.go | 2 +- satellite/accounting/rollup/common.go | 2 +- satellite/accounting/rolluparchive/rolluparchive.go | 2 +- satellite/accounting/tally/tally.go | 2 +- satellite/audit/containment.go | 2 +- satellite/audit/worker.go | 2 +- satellite/console/auth.go | 2 +- satellite/console/consoleweb/consoleapi/analytics.go | 2 +- satellite/console/consoleweb/consoleapi/apikeys.go | 2 +- satellite/console/consoleweb/consoleapi/auth.go | 2 +- satellite/console/consoleweb/consoleapi/buckets.go | 2 +- satellite/console/consoleweb/consoleapi/payments.go | 2 +- satellite/console/consoleweb/server.go | 2 +- satellite/console/service.go | 10 +++++----- satellite/console/service_test.go | 2 +- satellite/console/validation.go | 2 +- satellite/contact/endpoint.go | 6 +++--- satellite/gc/service.go | 2 +- satellite/inspector/inspector.go | 2 +- satellite/metabase/metaloop/service.go | 2 +- satellite/metainfo/expireddeletion/chore.go | 2 +- satellite/metainfo/metainfo.go | 4 ++-- satellite/metrics/chore.go | 2 +- satellite/orders/endpoint.go | 2 +- satellite/overlay/config.go | 2 +- satellite/payments/coinpayments/client.go | 2 +- satellite/payments/stripecoinpayments/clearing.go | 2 +- satellite/payments/stripecoinpayments/service.go | 2 +- satellite/payments/stripecoinpayments/version.go | 2 +- satellite/repair/checker/checker.go | 2 +- satellite/repair/queue/common.go | 2 +- satellite/repair/repairer/repairer.go | 2 +- satellite/repair/repairer/segments.go | 4 ++-- satellite/satellitedb/overlaycache.go | 2 +- satellite/snopayouts/payouts.go | 4 ++-- storage/boltdb/client.go | 2 +- storage/redis/client.go | 2 +- storagenode/apikeys/apikeys.go | 2 +- storagenode/apikeys/service.go | 2 +- storagenode/console/consoleapi/notifications.go | 2 +- storagenode/console/consoleapi/payouts.go | 2 +- storagenode/console/consoleapi/payouts_test.go | 4 ++-- storagenode/console/consoleapi/storagenode.go | 4 ++-- storagenode/console/consoleserver/server.go | 2 +- storagenode/console/service.go | 2 +- storagenode/contact/service.go | 2 +- storagenode/nodestats/service.go | 2 +- storagenode/payouts/estimatedpayouts/service.go | 2 +- storagenode/payouts/payouts.go | 2 +- storagenode/payouts/service.go | 2 +- storagenode/piecestore/usedserials/table.go | 2 +- storagenode/storagenodedb/apikeys.go | 2 +- storagenode/storagenodedb/bandwidthdb.go | 2 +- storagenode/storagenodedb/notifications.go | 2 +- storagenode/storagenodedb/orders.go | 2 +- storagenode/storagenodedb/payouts.go | 2 +- storagenode/storagenodedb/pieceexpiration.go | 2 +- storagenode/storagenodedb/pieceinfo.go | 2 +- storagenode/storagenodedb/piecespaceused.go | 2 +- storagenode/storagenodedb/pricing.go | 2 +- storagenode/storagenodedb/reputation.go | 2 +- storagenode/storagenodedb/satellites.go | 2 +- versioncontrol/peer.go | 2 +- 89 files changed, 112 insertions(+), 112 deletions(-) diff --git a/certificate/authorization/authorizations.go b/certificate/authorization/authorizations.go index b9f2f673c..84fc1f973 100644 --- a/certificate/authorization/authorizations.go +++ b/certificate/authorization/authorizations.go @@ -38,9 +38,9 @@ const ( var ( mon = monkit.Package() // Error is used when an error occurs involving an authorization. - Error = errs.Class("authorization error") + Error = errs.Class("authorization") // ErrInvalidToken is used when a token is invalid. - ErrInvalidToken = errs.Class("authorization token error") + ErrInvalidToken = errs.Class("authorization token") ) // Group is a slice of authorizations for convenient de/serialization. diff --git a/certificate/authorization/db.go b/certificate/authorization/db.go index e3cc6b550..540b2efd6 100644 --- a/certificate/authorization/db.go +++ b/certificate/authorization/db.go @@ -20,19 +20,19 @@ import ( var ( // ErrDB is used when an error occurs involving the authorization database. - ErrDB = errs.Class("authorization db error") + ErrDB = errs.Class("authorizationdb") // ErrEmptyUserID is used when a user ID is required but not provided. ErrEmptyUserID = ErrDB.New("userID cannot be empty") // ErrCount is used when attempting to create an invalid number of authorizations. ErrCount = ErrDB.New("cannot add less than one authorization") // ErrInvalidClaim is used when a claim is invalid due to some user input. - ErrInvalidClaim = errs.Class("authorization claim error") + ErrInvalidClaim = errs.Class("invalid authorization claim") // ErrAlreadyClaimed is used when a valid claim is attempted with a token that's been used already. ErrAlreadyClaimed = errs.Class("authorization already claimed") // ErrNotFound is used when there is no matching authorization in the DB for a given userID and token. ErrNotFound = errs.Class("authorization not found") // ErrDBInternal is used when an internal error occurs involving the authorization database. - ErrDBInternal = errs.Class("internal authorization db error") + ErrDBInternal = errs.Class("internal authorization db") ) // DB stores authorizations which may be claimed in exchange for a diff --git a/certificate/authorization/endpoint.go b/certificate/authorization/endpoint.go index c68307827..648d75c17 100644 --- a/certificate/authorization/endpoint.go +++ b/certificate/authorization/endpoint.go @@ -19,7 +19,7 @@ import ( ) // ErrEndpoint is the default error class for the authorization endpoint. -var ErrEndpoint = errs.Class("authorization endpoint error") +var ErrEndpoint = errs.Class("authorization endpoint") // Endpoint provides a http endpoint for interacting with an authorization service. type Endpoint struct { diff --git a/certificate/authorization/service.go b/certificate/authorization/service.go index 8fbe4e2b7..fa9df6dfa 100644 --- a/certificate/authorization/service.go +++ b/certificate/authorization/service.go @@ -12,7 +12,7 @@ import ( ) // ErrService is the default error class for the authorization service. -var ErrService = errs.Class("authorization service error") +var ErrService = errs.Class("authorization service") // Service is the authorization service. type Service struct { diff --git a/certificate/peer.go b/certificate/peer.go index 78eb351a7..945abc228 100644 --- a/certificate/peer.go +++ b/certificate/peer.go @@ -25,7 +25,7 @@ var ( mon = monkit.Package() // Error is the default error class for the certificates peer. - Error = errs.Class("certificates peer error") + Error = errs.Class("certificate") ) // Config is the global certificates config. diff --git a/cmd/certificates/verify.go b/cmd/certificates/verify.go index 897afb488..e7e0ff8f1 100644 --- a/cmd/certificates/verify.go +++ b/cmd/certificates/verify.go @@ -21,7 +21,7 @@ type verifyConfig struct { } var ( - errVerify = errs.Class("Verify error") + errVerify = errs.Class("verify") verifyCmd = &cobra.Command{ Use: "verify", Short: "Verify identity and CA certificate chains are valid", diff --git a/cmd/identity/identity.go b/cmd/identity/identity.go index 54ad580a6..063e6e28f 100644 --- a/cmd/identity/identity.go +++ b/cmd/identity/identity.go @@ -16,7 +16,7 @@ import ( var ( // ErrSetup is used when an error occurs while setting up. - ErrSetup = errs.Class("setup error") + ErrSetup = errs.Class("setup") idCmd = &cobra.Command{ Use: "id", diff --git a/cmd/inspector/main.go b/cmd/inspector/main.go index a72b079b5..33e952c7a 100644 --- a/cmd/inspector/main.go +++ b/cmd/inspector/main.go @@ -38,16 +38,16 @@ var ( CSVPath string // ErrInspectorDial throws when there are errors dialing the inspector server. - ErrInspectorDial = errs.Class("error dialing inspector server:") + ErrInspectorDial = errs.Class("dialing inspector server") // ErrRequest is for request errors after dialing. - ErrRequest = errs.Class("error processing request:") + ErrRequest = errs.Class("processing request") // ErrIdentity is for errors during identity creation for this CLI. - ErrIdentity = errs.Class("error creating identity:") + ErrIdentity = errs.Class("creating identity") // ErrArgs throws when there are errors with CLI args. - ErrArgs = errs.Class("error with CLI args:") + ErrArgs = errs.Class("invalid CLI args") irreparableLimit int32 diff --git a/multinode/console/controllers/nodes.go b/multinode/console/controllers/nodes.go index 98da7bd31..671e8b8ce 100644 --- a/multinode/console/controllers/nodes.go +++ b/multinode/console/controllers/nodes.go @@ -18,7 +18,7 @@ import ( var ( // ErrNodes is an internal error type for nodes web api controller. - ErrNodes = errs.Class("nodes web api controller error") + ErrNodes = errs.Class("nodes web api controller") ) // Nodes is a web api controller. diff --git a/multinode/console/controllers/payouts.go b/multinode/console/controllers/payouts.go index 069e3b2c0..4cb59afcc 100644 --- a/multinode/console/controllers/payouts.go +++ b/multinode/console/controllers/payouts.go @@ -15,7 +15,7 @@ import ( var ( // ErrPayouts is an internal error type for payouts web api controller. - ErrPayouts = errs.Class("payouts web api controller error") + ErrPayouts = errs.Class("payouts web api controller") ) // Payouts is a web api controller. diff --git a/multinode/console/server/server.go b/multinode/console/server/server.go index 440af3001..cf3a313eb 100644 --- a/multinode/console/server/server.go +++ b/multinode/console/server/server.go @@ -22,7 +22,7 @@ import ( var ( // Error is an error class for internal Multinode Dashboard http server error. - Error = errs.Class("multinode console server error") + Error = errs.Class("multinode console server") ) // Config contains configuration for Multinode Dashboard http server. diff --git a/multinode/multinodedb/database.go b/multinode/multinodedb/database.go index 504440cfa..6a24153cb 100644 --- a/multinode/multinodedb/database.go +++ b/multinode/multinodedb/database.go @@ -26,7 +26,7 @@ var ( mon = monkit.Package() // Error is the default multinodedb errs class. - Error = errs.Class("multinodedb internal error") + Error = errs.Class("multinodedb") ) // multinodeDB combines access to different database tables with a record diff --git a/multinode/multinodedb/dbx/gen.go b/multinode/multinodedb/dbx/gen.go index 6209656f5..264fa511d 100644 --- a/multinode/multinodedb/dbx/gen.go +++ b/multinode/multinodedb/dbx/gen.go @@ -14,7 +14,7 @@ var mon = monkit.Package() func init() { // catch dbx errors - class := errs.Class("multinodedb dbx error") + class := errs.Class("multinodedb dbx") WrapErr = func(e *Error) error { if e.Code == ErrorCode_NoRows { return e.Err diff --git a/multinode/multinodedb/members.go b/multinode/multinodedb/members.go index 1ead61d7b..715f8de12 100644 --- a/multinode/multinodedb/members.go +++ b/multinode/multinodedb/members.go @@ -16,7 +16,7 @@ import ( ) // MembersDBError indicates about internal MembersDB error. -var MembersDBError = errs.Class("MembersDB error") +var MembersDBError = errs.Class("MembersDB") // ensures that members implements console.Members. var _ console.Members = (*members)(nil) diff --git a/multinode/multinodedb/nodes.go b/multinode/multinodedb/nodes.go index 6596905a2..4979f82f2 100644 --- a/multinode/multinodedb/nodes.go +++ b/multinode/multinodedb/nodes.go @@ -16,7 +16,7 @@ import ( ) // ErrNodesDB indicates about internal NodesDB error. -var ErrNodesDB = errs.Class("NodesDB error") +var ErrNodesDB = errs.Class("NodesDB") // ensures that nodesdb implements console.Nodes. var _ nodes.DB = (*nodesdb)(nil) diff --git a/multinode/nodes/service.go b/multinode/nodes/service.go index abbf6673c..9dd4863c1 100644 --- a/multinode/nodes/service.go +++ b/multinode/nodes/service.go @@ -20,7 +20,7 @@ var ( mon = monkit.Package() // Error is an error class for nodes service error. - Error = errs.Class("nodes service error") + Error = errs.Class("nodes") ) // Service exposes all nodes related logic. diff --git a/multinode/payouts/service.go b/multinode/payouts/service.go index 9ab4ef862..325cf0744 100644 --- a/multinode/payouts/service.go +++ b/multinode/payouts/service.go @@ -19,7 +19,7 @@ import ( var ( mon = monkit.Package() // Error is an error class for payouts service error. - Error = errs.Class("payouts service error") + Error = errs.Class("payouts") ) // Service exposes all payouts related logic. diff --git a/private/migrate/versions.go b/private/migrate/versions.go index 7cc1ea34d..0b6351c54 100644 --- a/private/migrate/versions.go +++ b/private/migrate/versions.go @@ -21,11 +21,11 @@ import ( var ( // ErrValidateVersionQuery is when there is an error querying version table. - ErrValidateVersionQuery = errs.Class("validate db version query error") + ErrValidateVersionQuery = errs.Class("validate db version query") // ErrValidateVersionMismatch is when the migration version does not match the current database version. - ErrValidateVersionMismatch = errs.Class("validate db version mismatch error") + ErrValidateVersionMismatch = errs.Class("validate db version mismatch") // ErrValidateMinVersion is when the migration version does not match the current database version. - ErrValidateMinVersion = errs.Class("validate minimum version error") + ErrValidateMinVersion = errs.Class("validate minimum version") ) /* diff --git a/private/nodeoperator/operator.go b/private/nodeoperator/operator.go index 0801149bb..7e155a089 100644 --- a/private/nodeoperator/operator.go +++ b/private/nodeoperator/operator.go @@ -17,7 +17,7 @@ var DefaultWalletFeaturesValidation = WalletFeaturesValidation{ } // WalletFeatureValidationError wallet feature validation errors class. -var WalletFeatureValidationError = errs.Class("wallet feature validation error") +var WalletFeatureValidationError = errs.Class("wallet feature validation") // WalletFeaturesValidation contains config for wallet feature validation. type WalletFeaturesValidation struct { diff --git a/private/post/message.go b/private/post/message.go index 2df803b1d..1a63fdade 100644 --- a/private/post/message.go +++ b/private/post/message.go @@ -38,7 +38,7 @@ type Part struct { } // Error is the default message errs class. -var Error = errs.Class("Email message error") +var Error = errs.Class("Email message") // Bytes builds message and returns result as bytes. func (msg *Message) Bytes() (data []byte, err error) { diff --git a/private/quic/common.go b/private/quic/common.go index e71b5b76d..97bdc6629 100644 --- a/private/quic/common.go +++ b/private/quic/common.go @@ -12,5 +12,5 @@ var ( mon = monkit.Package() // Error is a pkg/quic error. - Error = errs.Class("quic error") + Error = errs.Class("quic") ) diff --git a/private/revocation/db.go b/private/revocation/db.go index f23ce5120..2d15caf30 100644 --- a/private/revocation/db.go +++ b/private/revocation/db.go @@ -20,8 +20,8 @@ import ( var ( mon = monkit.Package() - // Error is a pkg/revocation error. - Error = errs.Class("revocation error") + // Error is a revocation error. + Error = errs.Class("revocation") ) // DB stores the most recently seen revocation for each nodeID diff --git a/private/server/common.go b/private/server/common.go index 433791ae4..72c30aeb4 100644 --- a/private/server/common.go +++ b/private/server/common.go @@ -12,5 +12,5 @@ var ( mon = monkit.Package() // Error is a pkg/server error. - Error = errs.Class("server error") + Error = errs.Class("server") ) diff --git a/private/version/checker/client.go b/private/version/checker/client.go index f12f13f4a..23c974cc6 100644 --- a/private/version/checker/client.go +++ b/private/version/checker/client.go @@ -22,8 +22,8 @@ import ( var ( mon = monkit.Package() - // Error is the error class for version control client errors. - Error = errs.Class("version control client error") + // Error is the error class for version checker client errors. + Error = errs.Class("version checker client") ) // ClientConfig is the config struct for the version control client. diff --git a/satellite/accounting/common.go b/satellite/accounting/common.go index d02669cca..8614a107e 100644 --- a/satellite/accounting/common.go +++ b/satellite/accounting/common.go @@ -27,7 +27,7 @@ var ( ErrInvalidArgument = errs.Class("invalid argument") // ErrSystemOrNetError is returned when the used storage backend returns an // internal system or network error. - ErrSystemOrNetError = errs.Class("backend system error") + ErrSystemOrNetError = errs.Class("accounting backend") // ErrKeyNotFound is returned when the key is not found in the cache. ErrKeyNotFound = errs.Class("key not found") // ErrUnexpectedValue is returned when an unexpected value according the diff --git a/satellite/accounting/projectlimitcache.go b/satellite/accounting/projectlimitcache.go index 368b4ca64..895d396ae 100644 --- a/satellite/accounting/projectlimitcache.go +++ b/satellite/accounting/projectlimitcache.go @@ -16,11 +16,11 @@ import ( var ( // ErrProjectLimitType error for project limit type. - ErrProjectLimitType = errs.Class("project limit type error") + ErrProjectLimitType = errs.Class("project limit type") // ErrGetProjectLimit error for getting project limits from database. - ErrGetProjectLimit = errs.Class("get project limits error") + ErrGetProjectLimit = errs.Class("get project limits") // ErrGetProjectLimitCache error for getting project limits from cache. - ErrGetProjectLimitCache = errs.Class("get project limits from cache error") + ErrGetProjectLimitCache = errs.Class("get project limits from cache") ) // ProjectLimitDB stores information about projects limits for storage and bandwidth limits. diff --git a/satellite/accounting/projectusage.go b/satellite/accounting/projectusage.go index 9b194cd70..84c5bbad3 100644 --- a/satellite/accounting/projectusage.go +++ b/satellite/accounting/projectusage.go @@ -19,7 +19,7 @@ var mon = monkit.Package() var ( // ErrProjectUsage general error for project usage. - ErrProjectUsage = errs.Class("project usage error") + ErrProjectUsage = errs.Class("project usage") ) // Service is handling project usage related logic. diff --git a/satellite/accounting/rollup/common.go b/satellite/accounting/rollup/common.go index 99fb6b952..119592227 100644 --- a/satellite/accounting/rollup/common.go +++ b/satellite/accounting/rollup/common.go @@ -10,6 +10,6 @@ import ( // Error is a standard error class for this package. var ( - Error = errs.Class("rollup error") + Error = errs.Class("rollup") mon = monkit.Package() ) diff --git a/satellite/accounting/rolluparchive/rolluparchive.go b/satellite/accounting/rolluparchive/rolluparchive.go index 975c9cb45..e68ee46e5 100644 --- a/satellite/accounting/rolluparchive/rolluparchive.go +++ b/satellite/accounting/rolluparchive/rolluparchive.go @@ -17,7 +17,7 @@ import ( // Error is a standard error class for this package. var ( - Error = errs.Class("rolluparchive error") + Error = errs.Class("rolluparchive") mon = monkit.Package() ) diff --git a/satellite/accounting/tally/tally.go b/satellite/accounting/tally/tally.go index 57cc21568..abbae88dd 100644 --- a/satellite/accounting/tally/tally.go +++ b/satellite/accounting/tally/tally.go @@ -21,7 +21,7 @@ import ( // Error is a standard error class for this package. var ( - Error = errs.Class("tally error") + Error = errs.Class("tally") mon = monkit.Package() ) diff --git a/satellite/audit/containment.go b/satellite/audit/containment.go index a374aced4..9c710d1df 100644 --- a/satellite/audit/containment.go +++ b/satellite/audit/containment.go @@ -15,7 +15,7 @@ import ( var ( // ContainError is the containment errs class. - ContainError = errs.Class("containment error") + ContainError = errs.Class("containment") // ErrContainedNotFound is the errs class for when a pending audit isn't found. ErrContainedNotFound = errs.Class("pending audit not found") diff --git a/satellite/audit/worker.go b/satellite/audit/worker.go index 28f3d558b..88fda6cfb 100644 --- a/satellite/audit/worker.go +++ b/satellite/audit/worker.go @@ -16,7 +16,7 @@ import ( ) // Error is the default audit errs class. -var Error = errs.Class("audit error") +var Error = errs.Class("audit") // Config contains configurable values for audit chore and workers. type Config struct { diff --git a/satellite/console/auth.go b/satellite/console/auth.go index 82eddc058..96a08af39 100644 --- a/satellite/console/auth.go +++ b/satellite/console/auth.go @@ -42,7 +42,7 @@ const authKey key = 0 const requestKey key = 1 // ErrUnauthorized is error class for authorization related errors. -var ErrUnauthorized = errs.Class("unauthorized error") +var ErrUnauthorized = errs.Class("unauthorized") // Authorization contains auth info of authorized User. type Authorization struct { diff --git a/satellite/console/consoleweb/consoleapi/analytics.go b/satellite/console/consoleweb/consoleapi/analytics.go index 286d28853..3f2cfebb1 100644 --- a/satellite/console/consoleweb/consoleapi/analytics.go +++ b/satellite/console/consoleweb/consoleapi/analytics.go @@ -17,7 +17,7 @@ import ( var ( // ErrAnalyticsAPI - console analytics api error type. - ErrAnalyticsAPI = errs.Class("console analytics api error") + ErrAnalyticsAPI = errs.Class("consoleapi analytics") ) // Analytics is an api controller that exposes analytics related functionality. diff --git a/satellite/console/consoleweb/consoleapi/apikeys.go b/satellite/console/consoleweb/consoleapi/apikeys.go index 89684b5d9..cbadd50ae 100644 --- a/satellite/console/consoleweb/consoleapi/apikeys.go +++ b/satellite/console/consoleweb/consoleapi/apikeys.go @@ -16,7 +16,7 @@ import ( var ( // ErrAPIKeysAPI - console api keys api error type. - ErrAPIKeysAPI = errs.Class("console api keys api error") + ErrAPIKeysAPI = errs.Class("consoleapi keys") ) // APIKeys is an api controller that exposes all api keys related functionality. diff --git a/satellite/console/consoleweb/consoleapi/auth.go b/satellite/console/consoleweb/consoleapi/auth.go index ae6070162..27a3850a9 100644 --- a/satellite/console/consoleweb/consoleapi/auth.go +++ b/satellite/console/consoleweb/consoleapi/auth.go @@ -24,7 +24,7 @@ import ( var ( // ErrAuthAPI - console auth api error type. - ErrAuthAPI = errs.Class("console auth api error") + ErrAuthAPI = errs.Class("consoleapi auth") // errNotImplemented is the error value used by handlers of this package to // response with status Not Implemented. diff --git a/satellite/console/consoleweb/consoleapi/buckets.go b/satellite/console/consoleweb/consoleapi/buckets.go index 5601336e1..990a181bb 100644 --- a/satellite/console/consoleweb/consoleapi/buckets.go +++ b/satellite/console/consoleweb/consoleapi/buckets.go @@ -16,7 +16,7 @@ import ( var ( // ErrBucketsAPI - console buckets api error type. - ErrBucketsAPI = errs.Class("console buckets api error") + ErrBucketsAPI = errs.Class("consoleapi buckets") ) // Buckets is an api controller that exposes all buckets related functionality. diff --git a/satellite/console/consoleweb/consoleapi/payments.go b/satellite/console/consoleweb/consoleapi/payments.go index 27913c82e..3551533b4 100644 --- a/satellite/console/consoleweb/consoleapi/payments.go +++ b/satellite/console/consoleweb/consoleapi/payments.go @@ -21,7 +21,7 @@ import ( var ( // ErrPaymentsAPI - console payments api error type. - ErrPaymentsAPI = errs.Class("console payments api error") + ErrPaymentsAPI = errs.Class("consoleapi payments") mon = monkit.Package() ) diff --git a/satellite/console/consoleweb/server.go b/satellite/console/consoleweb/server.go index fac64bf10..59a87a00e 100644 --- a/satellite/console/consoleweb/server.go +++ b/satellite/console/consoleweb/server.go @@ -54,7 +54,7 @@ const ( var ( // Error is satellite console error type. - Error = errs.Class("satellite console error") + Error = errs.Class("consoleweb") mon = monkit.Package() ) diff --git a/satellite/console/service.go b/satellite/console/service.go index f6ec6e7ec..99d6d5748 100644 --- a/satellite/console/service.go +++ b/satellite/console/service.go @@ -59,19 +59,19 @@ const ( var ( // Error describes internal console error. - Error = errs.Class("service error") + Error = errs.Class("console service") // ErrNoMembership is error type of not belonging to a specific project. - ErrNoMembership = errs.Class("no membership error") + ErrNoMembership = errs.Class("no membership") // ErrTokenExpiration is error type of token reached expiration time. - ErrTokenExpiration = errs.Class("token expiration error") + ErrTokenExpiration = errs.Class("token expiration") // ErrProjLimit is error type of project limit. - ErrProjLimit = errs.Class("project limit error") + ErrProjLimit = errs.Class("project limit") // ErrUsage is error type of project usage. - ErrUsage = errs.Class("project usage error") + ErrUsage = errs.Class("project usage") // ErrEmailUsed is error type that occurs on repeating auth attempts with email. ErrEmailUsed = errs.Class("email used") diff --git a/satellite/console/service_test.go b/satellite/console/service_test.go index 05b48b3f9..741c1d358 100644 --- a/satellite/console/service_test.go +++ b/satellite/console/service_test.go @@ -131,7 +131,7 @@ func TestService(t *testing.T) { // deleting a project with a bucket should fail err = service.DeleteProject(authCtx2, up2Pro1.ID) require.Error(t, err) - require.Equal(t, "service error: project usage error: some buckets still exist", err.Error()) + require.Equal(t, "console service: project usage: some buckets still exist", err.Error()) }) t.Run("TestChangeEmail", func(t *testing.T) { diff --git a/satellite/console/validation.go b/satellite/console/validation.go index f0ff42d02..720ee8456 100644 --- a/satellite/console/validation.go +++ b/satellite/console/validation.go @@ -12,7 +12,7 @@ const ( ) // ErrValidation validation related error class. -var ErrValidation = errs.Class("validation error") +var ErrValidation = errs.Class("validation") // validationError is slice of ErrValidation class errors. type validationErrors []error diff --git a/satellite/contact/endpoint.go b/satellite/contact/endpoint.go index 683877ba9..c2b2bcc11 100644 --- a/satellite/contact/endpoint.go +++ b/satellite/contact/endpoint.go @@ -19,9 +19,9 @@ import ( ) var ( - errPingBackDial = errs.Class("pingback dialing error") - errCheckInIdentity = errs.Class("check-in identity error") - errCheckInNetwork = errs.Class("check-in network error") + errPingBackDial = errs.Class("pingback dialing") + errCheckInIdentity = errs.Class("check-in identity") + errCheckInNetwork = errs.Class("check-in network") ) // Endpoint implements the contact service Endpoints. diff --git a/satellite/gc/service.go b/satellite/gc/service.go index f37b8a671..51908f8f8 100644 --- a/satellite/gc/service.go +++ b/satellite/gc/service.go @@ -23,7 +23,7 @@ import ( var ( // Error defines the gc service errors class. - Error = errs.Class("gc service error") + Error = errs.Class("gc") mon = monkit.Package() ) diff --git a/satellite/inspector/inspector.go b/satellite/inspector/inspector.go index 5f8696d42..bd9ec39b6 100644 --- a/satellite/inspector/inspector.go +++ b/satellite/inspector/inspector.go @@ -23,7 +23,7 @@ import ( var ( mon = monkit.Package() // Error wraps errors returned from Server struct methods. - Error = errs.Class("Endpoint error") + Error = errs.Class("inspector") ) // Endpoint for checking object and segment health. diff --git a/satellite/metabase/metaloop/service.go b/satellite/metabase/metaloop/service.go index 2fc25d9a5..1ec9df04d 100644 --- a/satellite/metabase/metaloop/service.go +++ b/satellite/metabase/metaloop/service.go @@ -23,7 +23,7 @@ var ( mon = monkit.Package() // Error is a standard error class for this component. - Error = errs.Class("metainfo loop error") + Error = errs.Class("metainfo loop") // ErrClosed is a loop closed error. ErrClosed = Error.New("loop closed") ) diff --git a/satellite/metainfo/expireddeletion/chore.go b/satellite/metainfo/expireddeletion/chore.go index afd48a33a..913721096 100644 --- a/satellite/metainfo/expireddeletion/chore.go +++ b/satellite/metainfo/expireddeletion/chore.go @@ -18,7 +18,7 @@ import ( var ( // Error defines the expireddeletion chore errors class. - Error = errs.Class("expireddeletion chore error") + Error = errs.Class("expired deletion") mon = monkit.Package() ) diff --git a/satellite/metainfo/metainfo.go b/satellite/metainfo/metainfo.go index 1eb57fd6d..d4edc9128 100644 --- a/satellite/metainfo/metainfo.go +++ b/satellite/metainfo/metainfo.go @@ -46,9 +46,9 @@ const ( var ( mon = monkit.Package() // Error general metainfo error. - Error = errs.Class("metainfo error") + Error = errs.Class("metainfo") // ErrNodeAlreadyExists pointer already has a piece for a node err. - ErrNodeAlreadyExists = errs.Class("metainfo error: node already exists") + ErrNodeAlreadyExists = errs.Class("metainfo: node already exists") ) // APIKeys is api keys store methods used by endpoint. diff --git a/satellite/metrics/chore.go b/satellite/metrics/chore.go index e92622e73..17aeb72a9 100644 --- a/satellite/metrics/chore.go +++ b/satellite/metrics/chore.go @@ -17,7 +17,7 @@ import ( var ( // Error defines the metrics chore errors class. - Error = errs.Class("metrics chore error") + Error = errs.Class("metrics") mon = monkit.Package() ) diff --git a/satellite/orders/endpoint.go b/satellite/orders/endpoint.go index 0eccf2dcc..2e091ad38 100644 --- a/satellite/orders/endpoint.go +++ b/satellite/orders/endpoint.go @@ -75,7 +75,7 @@ type PendingSerial struct { var ( // Error the default orders errs class. - Error = errs.Class("orders error") + Error = errs.Class("orders") // ErrUsingSerialNumber error class for serial number. ErrUsingSerialNumber = errs.Class("serial number") diff --git a/satellite/overlay/config.go b/satellite/overlay/config.go index 6ba86397d..517658828 100644 --- a/satellite/overlay/config.go +++ b/satellite/overlay/config.go @@ -15,7 +15,7 @@ import ( var ( mon = monkit.Package() // Error represents an overlay error. - Error = errs.Class("overlay error") + Error = errs.Class("overlay") ) // Config is a configuration for overlay service. diff --git a/satellite/payments/coinpayments/client.go b/satellite/payments/coinpayments/client.go index bd96def86..7e67d6a3d 100644 --- a/satellite/payments/coinpayments/client.go +++ b/satellite/payments/coinpayments/client.go @@ -17,7 +17,7 @@ import ( ) // Error is error class API errors. -var Error = errs.Class("coinpayments client error") +var Error = errs.Class("coinpayments client") // ErrMissingPublicKey is returned when Coinpayments client is missing public key. var ErrMissingPublicKey = errs.Class("missing public key") diff --git a/satellite/payments/stripecoinpayments/clearing.go b/satellite/payments/stripecoinpayments/clearing.go index 67980c96f..59d6dba31 100644 --- a/satellite/payments/stripecoinpayments/clearing.go +++ b/satellite/payments/stripecoinpayments/clearing.go @@ -15,7 +15,7 @@ import ( ) // ErrChore is stripecoinpayments clearing loop chore error class. -var ErrChore = errs.Class("stripecoinpayments chore error") +var ErrChore = errs.Class("stripecoinpayments chore") // Chore runs clearing process of reconciling transactions deposits, // customer balance, invoices and usages. diff --git a/satellite/payments/stripecoinpayments/service.go b/satellite/payments/stripecoinpayments/service.go index bde2e714a..6ef08887e 100644 --- a/satellite/payments/stripecoinpayments/service.go +++ b/satellite/payments/stripecoinpayments/service.go @@ -29,7 +29,7 @@ import ( var ( // Error defines stripecoinpayments service error. - Error = errs.Class("stripecoinpayments service error") + Error = errs.Class("stripecoinpayments service") // ErrNoCouponUsages indicates that there are no coupon usages. ErrNoCouponUsages = errs.Class("stripecoinpayments no coupon usages") diff --git a/satellite/payments/stripecoinpayments/version.go b/satellite/payments/stripecoinpayments/version.go index 7f4314951..11989366e 100644 --- a/satellite/payments/stripecoinpayments/version.go +++ b/satellite/payments/stripecoinpayments/version.go @@ -14,7 +14,7 @@ import ( ) // ErrVersion defines version service error. -var ErrVersion = errs.Class("version service error") +var ErrVersion = errs.Class("version service") // VersionService updates conversion rates in a loop. // diff --git a/satellite/repair/checker/checker.go b/satellite/repair/checker/checker.go index 164c4b343..6c086e6c8 100644 --- a/satellite/repair/checker/checker.go +++ b/satellite/repair/checker/checker.go @@ -28,7 +28,7 @@ import ( // Error is a standard error class for this package. var ( - Error = errs.Class("checker error") + Error = errs.Class("repair checker") mon = monkit.Package() ) diff --git a/satellite/repair/queue/common.go b/satellite/repair/queue/common.go index af2dd8efd..df570e250 100644 --- a/satellite/repair/queue/common.go +++ b/satellite/repair/queue/common.go @@ -8,4 +8,4 @@ import ( ) // Error is a standard error class for this package. -var Error = errs.Class("queue error") +var Error = errs.Class("repair queue") diff --git a/satellite/repair/repairer/repairer.go b/satellite/repair/repairer/repairer.go index ad28ca4f4..74f5a2f53 100644 --- a/satellite/repair/repairer/repairer.go +++ b/satellite/repair/repairer/repairer.go @@ -22,7 +22,7 @@ import ( // Error is a standard error class for this package. var ( - Error = errs.Class("repairer error") + Error = errs.Class("repairer") mon = monkit.Package() ) diff --git a/satellite/repair/repairer/segments.go b/satellite/repair/repairer/segments.go index 9e75e8834..463ba790b 100644 --- a/satellite/repair/repairer/segments.go +++ b/satellite/repair/repairer/segments.go @@ -26,8 +26,8 @@ import ( ) var ( - metainfoGetError = errs.Class("metainfo db get error") - metainfoPutError = errs.Class("metainfo db put error") + metainfoGetError = errs.Class("metainfo db get") + metainfoPutError = errs.Class("metainfo db put") invalidRepairError = errs.Class("invalid repair") overlayQueryError = errs.Class("overlay query failure") orderLimitFailureError = errs.Class("order limits failure") diff --git a/satellite/satellitedb/overlaycache.go b/satellite/satellitedb/overlaycache.go index 4c6d8ea08..ebf0208de 100644 --- a/satellite/satellitedb/overlaycache.go +++ b/satellite/satellitedb/overlaycache.go @@ -1743,7 +1743,7 @@ func (cache *overlaycache) UpdateCheckIn(ctx context.Context, node overlay.NodeC var ( // ErrVetting is the error class for the following test methods. - ErrVetting = errs.Class("vetting error") + ErrVetting = errs.Class("vetting") ) // TestVetNode directly sets a node's vetted_at timestamp to make testing easier. diff --git a/satellite/snopayouts/payouts.go b/satellite/snopayouts/payouts.go index b6fb6abf5..129c1df40 100644 --- a/satellite/snopayouts/payouts.go +++ b/satellite/snopayouts/payouts.go @@ -34,10 +34,10 @@ type DB interface { } // ErrNoDataForPeriod represents errors from the payouts database. -var ErrNoDataForPeriod = errs.Class("no payStub/payments for period error") +var ErrNoDataForPeriod = errs.Class("no payStub/payments for period") // Error is the default error class for payouts package. -var Error = errs.Class("payouts db error") +var Error = errs.Class("payoutsdb") // Paystub is an entity that holds held amount of cash that will be paid to storagenode operator after some period. type Paystub struct { diff --git a/storage/boltdb/client.go b/storage/boltdb/client.go index 952d150aa..7b3d49c9e 100644 --- a/storage/boltdb/client.go +++ b/storage/boltdb/client.go @@ -19,7 +19,7 @@ import ( var mon = monkit.Package() // Error is the default boltdb errs class. -var Error = errs.Class("boltdb error") +var Error = errs.Class("boltdb") // Client is the entrypoint into a bolt data store. type Client struct { diff --git a/storage/redis/client.go b/storage/redis/client.go index ae66798ce..8e11d6d7c 100644 --- a/storage/redis/client.go +++ b/storage/redis/client.go @@ -21,7 +21,7 @@ import ( var ( // Error is a redis error. - Error = errs.Class("redis error") + Error = errs.Class("redis") mon = monkit.Package() ) diff --git a/storagenode/apikeys/apikeys.go b/storagenode/apikeys/apikeys.go index cf5674e67..c90bec925 100644 --- a/storagenode/apikeys/apikeys.go +++ b/storagenode/apikeys/apikeys.go @@ -13,7 +13,7 @@ import ( ) // ErrNoAPIKey represents no api key error. -var ErrNoAPIKey = errs.Class("no api key error") +var ErrNoAPIKey = errs.Class("no api key") // DB is interface for working with api keys. // diff --git a/storagenode/apikeys/service.go b/storagenode/apikeys/service.go index e32748b90..a2ae3f6c9 100644 --- a/storagenode/apikeys/service.go +++ b/storagenode/apikeys/service.go @@ -15,7 +15,7 @@ import ( var ( // ErrService defines secret service error. - ErrService = errs.Class("secret service error") + ErrService = errs.Class("secret service") mon = monkit.Package() ) diff --git a/storagenode/console/consoleapi/notifications.go b/storagenode/console/consoleapi/notifications.go index e00e3db87..0dd785ff7 100644 --- a/storagenode/console/consoleapi/notifications.go +++ b/storagenode/console/consoleapi/notifications.go @@ -17,7 +17,7 @@ import ( ) // ErrNotificationsAPI - console notifications api error type. -var ErrNotificationsAPI = errs.Class("notifications console web error") +var ErrNotificationsAPI = errs.Class("consoleapi notifications") // Notifications is an api controller that exposes all notifications related api. type Notifications struct { diff --git a/storagenode/console/consoleapi/payouts.go b/storagenode/console/consoleapi/payouts.go index 9e63e8c49..3c185258b 100644 --- a/storagenode/console/consoleapi/payouts.go +++ b/storagenode/console/consoleapi/payouts.go @@ -16,7 +16,7 @@ import ( ) // ErrPayoutAPI - console payouts api error type. -var ErrPayoutAPI = errs.Class("payouts console web error") +var ErrPayoutAPI = errs.Class("consoleapi payouts") // Payout is an api controller that exposes all payouts related api. type Payout struct { diff --git a/storagenode/console/consoleapi/payouts_test.go b/storagenode/console/consoleapi/payouts_test.go index 505c5892a..bc35dbca4 100644 --- a/storagenode/console/consoleapi/payouts_test.go +++ b/storagenode/console/consoleapi/payouts_test.go @@ -294,7 +294,7 @@ func TestHeldAmountApi(t *testing.T) { body5, err := ioutil.ReadAll(res5.Body) require.NoError(t, err) - require.Equal(t, "{\"error\":\"payouts console web error: wrong period format: period has wrong format\"}\n", string(body5)) + require.Equal(t, "{\"error\":\"consoleapi payouts: wrong period format: period has wrong format\"}\n", string(body5)) }) t.Run("test AllPayStubsPeriod", func(t *testing.T) { @@ -350,7 +350,7 @@ func TestHeldAmountApi(t *testing.T) { body5, err := ioutil.ReadAll(res5.Body) require.NoError(t, err) - require.Equal(t, "{\"error\":\"payouts console web error: wrong period format: period has wrong format\"}\n", string(body5)) + require.Equal(t, "{\"error\":\"consoleapi payouts: wrong period format: period has wrong format\"}\n", string(body5)) }) t.Run("test HeldbackHistory", func(t *testing.T) { diff --git a/storagenode/console/consoleapi/storagenode.go b/storagenode/console/consoleapi/storagenode.go index b4dcb6137..9a8776416 100644 --- a/storagenode/console/consoleapi/storagenode.go +++ b/storagenode/console/consoleapi/storagenode.go @@ -16,8 +16,8 @@ import ( "storj.io/storj/storagenode/console" ) -// ErrStorageNodeAPI - console storageNode api error type. -var ErrStorageNodeAPI = errs.Class("storageNode console web error") +// ErrStorageNodeAPI - console storagenode api error type. +var ErrStorageNodeAPI = errs.Class("consoleapi storagenode") // StorageNode is an api controller that exposes all dashboard related api. type StorageNode struct { diff --git a/storagenode/console/consoleserver/server.go b/storagenode/console/consoleserver/server.go index 97dd314b0..98bb6c1da 100644 --- a/storagenode/console/consoleserver/server.go +++ b/storagenode/console/consoleserver/server.go @@ -26,7 +26,7 @@ import ( var ( mon = monkit.Package() // Error is storagenode console web error type. - Error = errs.Class("storagenode console web error") + Error = errs.Class("consoleserver") ) // Config contains configuration for storagenode console web server. diff --git a/storagenode/console/service.go b/storagenode/console/service.go index dafdcaab1..6b4704553 100644 --- a/storagenode/console/service.go +++ b/storagenode/console/service.go @@ -31,7 +31,7 @@ import ( var ( // SNOServiceErr defines sno service error. - SNOServiceErr = errs.Class("storage node dashboard service error") + SNOServiceErr = errs.Class("console") mon = monkit.Package() ) diff --git a/storagenode/contact/service.go b/storagenode/contact/service.go index 4b5ad01ed..a60820b52 100644 --- a/storagenode/contact/service.go +++ b/storagenode/contact/service.go @@ -26,7 +26,7 @@ var ( // Error is the default error class for contact package. Error = errs.Class("contact") - errPingSatellite = errs.Class("ping satellite error") + errPingSatellite = errs.Class("ping satellite") ) const initialBackOff = time.Second diff --git a/storagenode/nodestats/service.go b/storagenode/nodestats/service.go index 68fdcdf31..b711be6d3 100644 --- a/storagenode/nodestats/service.go +++ b/storagenode/nodestats/service.go @@ -22,7 +22,7 @@ import ( var ( // NodeStatsServiceErr defines node stats service error. - NodeStatsServiceErr = errs.Class("node stats service error") + NodeStatsServiceErr = errs.Class("nodestats") mon = monkit.Package() ) diff --git a/storagenode/payouts/estimatedpayouts/service.go b/storagenode/payouts/estimatedpayouts/service.go index b9f869f0e..df5d2b96b 100644 --- a/storagenode/payouts/estimatedpayouts/service.go +++ b/storagenode/payouts/estimatedpayouts/service.go @@ -23,7 +23,7 @@ import ( var ( // EstimationServiceErr defines sno service error. - EstimationServiceErr = errs.Class("storage node estimation payouts service error") + EstimationServiceErr = errs.Class("estimationservice") mon = monkit.Package() ) diff --git a/storagenode/payouts/payouts.go b/storagenode/payouts/payouts.go index 0794fad98..4dbd40683 100644 --- a/storagenode/payouts/payouts.go +++ b/storagenode/payouts/payouts.go @@ -43,7 +43,7 @@ type DB interface { } // ErrNoPayStubForPeriod represents errors from the payouts database. -var ErrNoPayStubForPeriod = errs.Class("no payStub for period error") +var ErrNoPayStubForPeriod = errs.Class("no payStub for period") // PayStub is node payouts data for satellite by specific period. type PayStub struct { diff --git a/storagenode/payouts/service.go b/storagenode/payouts/service.go index 95516870e..51d9fab75 100644 --- a/storagenode/payouts/service.go +++ b/storagenode/payouts/service.go @@ -25,7 +25,7 @@ import ( var ( // ErrPayoutService defines payout service error. - ErrPayoutService = errs.Class("payouts service error") + ErrPayoutService = errs.Class("payouts service") // ErrBadPeriod defines that period has wrong format. ErrBadPeriod = errs.Class("wrong period format") diff --git a/storagenode/piecestore/usedserials/table.go b/storagenode/piecestore/usedserials/table.go index 0f877252e..764762d98 100644 --- a/storagenode/piecestore/usedserials/table.go +++ b/storagenode/piecestore/usedserials/table.go @@ -19,7 +19,7 @@ import ( var ( // ErrSerials defines the usedserials store error class. - ErrSerials = errs.Class("used serials store error") + ErrSerials = errs.Class("usedserials") // ErrSerialAlreadyExists defines an error class for duplicate usedserials. ErrSerialAlreadyExists = errs.Class("used serial already exists in store") diff --git a/storagenode/storagenodedb/apikeys.go b/storagenode/storagenodedb/apikeys.go index ffa54996d..2b4ef9928 100644 --- a/storagenode/storagenodedb/apikeys.go +++ b/storagenode/storagenodedb/apikeys.go @@ -18,7 +18,7 @@ import ( var _ apikeys.DB = (*apiKeysDB)(nil) // ErrAPIKeysDB represents errors from the api keys database. -var ErrAPIKeysDB = errs.Class("apikeys db error") +var ErrAPIKeysDB = errs.Class("apikeysdb") // APIKeysDBName represents the database name. const APIKeysDBName = "secret" diff --git a/storagenode/storagenodedb/bandwidthdb.go b/storagenode/storagenodedb/bandwidthdb.go index 102ed23f9..e6ee78e6f 100644 --- a/storagenode/storagenodedb/bandwidthdb.go +++ b/storagenode/storagenodedb/bandwidthdb.go @@ -20,7 +20,7 @@ import ( ) // ErrBandwidth represents errors from the bandwidthdb database. -var ErrBandwidth = errs.Class("bandwidthdb error") +var ErrBandwidth = errs.Class("bandwidthdb") // BandwidthDBName represents the database name. const BandwidthDBName = "bandwidth" diff --git a/storagenode/storagenodedb/notifications.go b/storagenode/storagenodedb/notifications.go index 3d5b55947..057634d0a 100644 --- a/storagenode/storagenodedb/notifications.go +++ b/storagenode/storagenodedb/notifications.go @@ -20,7 +20,7 @@ var _ notifications.DB = (*notificationDB)(nil) const NotificationsDBName = "notifications" // ErrNotificationsDB represents errors from the notifications database. -var ErrNotificationsDB = errs.Class("notificationsDB error") +var ErrNotificationsDB = errs.Class("notificationsdb") // notificationDB is an implementation of notifications.Notifications. // diff --git a/storagenode/storagenodedb/orders.go b/storagenode/storagenodedb/orders.go index ca7201aec..e75cc44f5 100644 --- a/storagenode/storagenodedb/orders.go +++ b/storagenode/storagenodedb/orders.go @@ -19,7 +19,7 @@ import ( ) // ErrOrders represents errors from the ordersdb database. -var ErrOrders = errs.Class("ordersdb error") +var ErrOrders = errs.Class("ordersdb") // OrdersDBName represents the database name. const OrdersDBName = "orders" diff --git a/storagenode/storagenodedb/payouts.go b/storagenode/storagenodedb/payouts.go index 72223fac5..56df013af 100644 --- a/storagenode/storagenodedb/payouts.go +++ b/storagenode/storagenodedb/payouts.go @@ -18,7 +18,7 @@ import ( var _ payouts.DB = (*payoutDB)(nil) // ErrPayout represents errors from the payouts database. -var ErrPayout = errs.Class("payouts error") +var ErrPayout = errs.Class("payouts") // HeldAmountDBName represents the database name. const HeldAmountDBName = "heldamount" diff --git a/storagenode/storagenodedb/pieceexpiration.go b/storagenode/storagenodedb/pieceexpiration.go index 8dd022e8c..8e6d15175 100644 --- a/storagenode/storagenodedb/pieceexpiration.go +++ b/storagenode/storagenodedb/pieceexpiration.go @@ -14,7 +14,7 @@ import ( ) // ErrPieceExpiration represents errors from the piece expiration database. -var ErrPieceExpiration = errs.Class("piece expiration error") +var ErrPieceExpiration = errs.Class("pieceexpirationdb") // PieceExpirationDBName represents the database filename. const PieceExpirationDBName = "piece_expiration" diff --git a/storagenode/storagenodedb/pieceinfo.go b/storagenode/storagenodedb/pieceinfo.go index 65bb6ff37..a7ba9540b 100644 --- a/storagenode/storagenodedb/pieceinfo.go +++ b/storagenode/storagenodedb/pieceinfo.go @@ -18,7 +18,7 @@ import ( ) // ErrPieceInfo represents errors from the piece info database. -var ErrPieceInfo = errs.Class("v0pieceinfodb error") +var ErrPieceInfo = errs.Class("v0pieceinfodb") // PieceInfoDBName represents the database name. const PieceInfoDBName = "pieceinfo" diff --git a/storagenode/storagenodedb/piecespaceused.go b/storagenode/storagenodedb/piecespaceused.go index d73ab0ddf..1a548716e 100644 --- a/storagenode/storagenodedb/piecespaceused.go +++ b/storagenode/storagenodedb/piecespaceused.go @@ -15,7 +15,7 @@ import ( ) // ErrPieceSpaceUsed represents errors from the piece spaced used database. -var ErrPieceSpaceUsed = errs.Class("piece space used error") +var ErrPieceSpaceUsed = errs.Class("piece space used") // PieceSpaceUsedDBName represents the database name. const PieceSpaceUsedDBName = "piece_spaced_used" diff --git a/storagenode/storagenodedb/pricing.go b/storagenode/storagenodedb/pricing.go index 5ec2806da..85bd94db5 100644 --- a/storagenode/storagenodedb/pricing.go +++ b/storagenode/storagenodedb/pricing.go @@ -18,7 +18,7 @@ import ( var _ pricing.DB = (*pricingDB)(nil) // ErrPricing represents errors from the pricing database. -var ErrPricing = errs.Class("pricing error") +var ErrPricing = errs.Class("pricing") // PricingDBName represents the database name. const PricingDBName = "pricing" diff --git a/storagenode/storagenodedb/reputation.go b/storagenode/storagenodedb/reputation.go index 6650e9c0a..2818d0785 100644 --- a/storagenode/storagenodedb/reputation.go +++ b/storagenode/storagenodedb/reputation.go @@ -16,7 +16,7 @@ import ( ) // ErrReputation represents errors from the reputation database. -var ErrReputation = errs.Class("reputation error") +var ErrReputation = errs.Class("reputation") // ReputationDBName represents the database name. const ReputationDBName = "reputation" diff --git a/storagenode/storagenodedb/satellites.go b/storagenode/storagenodedb/satellites.go index 8e5653db3..855310b45 100644 --- a/storagenode/storagenodedb/satellites.go +++ b/storagenode/storagenodedb/satellites.go @@ -15,7 +15,7 @@ import ( ) // ErrSatellitesDB represents errors from the satellites database. -var ErrSatellitesDB = errs.Class("satellitesdb error") +var ErrSatellitesDB = errs.Class("satellitesdb") // SatellitesDBName represents the database name. const SatellitesDBName = "satellites" diff --git a/versioncontrol/peer.go b/versioncontrol/peer.go index 3dd9c7b67..da0e4c1ac 100644 --- a/versioncontrol/peer.go +++ b/versioncontrol/peer.go @@ -28,7 +28,7 @@ const seedLength = 32 var ( // RolloutErr defines the rollout config error class. - RolloutErr = errs.Class("rollout config error") + RolloutErr = errs.Class("rollout config") // EmptySeedErr is used when the rollout contains an empty seed value. EmptySeedErr = RolloutErr.New("empty seed") )