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