From 89ac29968829c377eac85a09b2cec87d0a529ccf Mon Sep 17 00:00:00 2001 From: Stephan D Date: Fri, 13 Feb 2026 16:47:04 +0100 Subject: [PATCH] fixed error definition --- api/fx/storage/storage.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/api/fx/storage/storage.go b/api/fx/storage/storage.go index 691f3783..01a95c7f 100644 --- a/api/fx/storage/storage.go +++ b/api/fx/storage/storage.go @@ -2,22 +2,17 @@ package storage import ( "context" + "errors" "time" "github.com/tech/sendico/fx/storage/model" ) -type storageError string - -func (e storageError) Error() string { - return string(e) -} - var ( - ErrQuoteExpired = storageError("fx.storage: quote expired") - ErrQuoteConsumed = storageError("fx.storage: quote consumed") - ErrQuoteNotFirm = storageError("fx.storage: quote is not firm") - ErrQuoteConsumptionRace = storageError("fx.storage: quote consumption collision") + ErrQuoteExpired = errors.New("fx.storage: quote expired") + ErrQuoteConsumed = errors.New("fx.storage: quote consumed") + ErrQuoteNotFirm = errors.New("fx.storage: quote is not firm") + ErrQuoteConsumptionRace = errors.New("fx.storage: quote consumption collision") ) type Repository interface {