fixed error definition

This commit is contained in:
Stephan D
2026-02-13 16:47:04 +01:00
parent 1c564daa41
commit 89ac299688

View File

@@ -2,22 +2,17 @@ package storage
import ( import (
"context" "context"
"errors"
"time" "time"
"github.com/tech/sendico/fx/storage/model" "github.com/tech/sendico/fx/storage/model"
) )
type storageError string
func (e storageError) Error() string {
return string(e)
}
var ( var (
ErrQuoteExpired = storageError("fx.storage: quote expired") ErrQuoteExpired = errors.New("fx.storage: quote expired")
ErrQuoteConsumed = storageError("fx.storage: quote consumed") ErrQuoteConsumed = errors.New("fx.storage: quote consumed")
ErrQuoteNotFirm = storageError("fx.storage: quote is not firm") ErrQuoteNotFirm = errors.New("fx.storage: quote is not firm")
ErrQuoteConsumptionRace = storageError("fx.storage: quote consumption collision") ErrQuoteConsumptionRace = errors.New("fx.storage: quote consumption collision")
) )
type Repository interface { type Repository interface {