Browse Source

Show more internal information about pq error

master
Peter Stuifzand 10 months ago
parent
commit
85ac5fb6f2
  1. 6
      cmd/hubserver/storage/postgres.go

6
cmd/hubserver/storage/postgres.go

@ -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
}

Loading…
Cancel
Save