Show more internal information about pq error
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter Stuifzand 2020-11-29 22:33:17 +01:00
parent cae5011ff0
commit 85ac5fb6f2

View File

@ -4,7 +4,8 @@ import (
"database/sql" "database/sql"
"fmt" "fmt"
_ "github.com/lib/pq" "github.com/davecgh/go-spew/spew"
"github.com/lib/pq"
) )
type postgres struct { type postgres struct {
@ -31,6 +32,9 @@ func (s *postgres) Subscribe(topic string, sub Subscriber) error {
sub.LeaseSeconds, sub.LeaseSeconds,
sub.Secret, sub.Secret,
) )
if e, ok := err.(pq.Error); ok {
spew.Dump(e)
}
return err return err
} }