Skip to content

Commit

Permalink
return the actual error from the routing connector (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
jc-fireball authored Dec 13, 2017
1 parent 6ff0a29 commit 42c9c5c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions connectors/routing/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (rc *Connector) Scan(ctx context.Context, ei *dosa.EntityInfo, minimumField
func (rc *Connector) CheckSchema(ctx context.Context, scope, namePrefix string, ed []*dosa.EntityDefinition) (int32, error) {
connector, err := rc.getConnector(scope, namePrefix, "CheckSchema")
if err != nil {
return dosa.InvalidVersion, base.ErrNoMoreConnector{}
return dosa.InvalidVersion, err
}
return connector.CheckSchema(ctx, scope, namePrefix, ed)
}
Expand All @@ -188,7 +188,7 @@ func (rc *Connector) CheckSchema(ctx context.Context, scope, namePrefix string,
func (rc *Connector) UpsertSchema(ctx context.Context, scope, namePrefix string, ed []*dosa.EntityDefinition) (*dosa.SchemaStatus, error) {
connector, err := rc.getConnector(scope, namePrefix, "UpsertSchema")
if err != nil {
return nil, base.ErrNoMoreConnector{}
return nil, err
}
return connector.UpsertSchema(ctx, scope, namePrefix, ed)
}
Expand All @@ -197,7 +197,7 @@ func (rc *Connector) UpsertSchema(ctx context.Context, scope, namePrefix string,
func (rc *Connector) CheckSchemaStatus(ctx context.Context, scope string, namePrefix string, version int32) (*dosa.SchemaStatus, error) {
connector, err := rc.getConnector(scope, namePrefix, "CheckSchemaStatus")
if err != nil {
return nil, base.ErrNoMoreConnector{}
return nil, err
}
return connector.CheckSchemaStatus(ctx, scope, namePrefix, version)
}
Expand All @@ -207,7 +207,7 @@ func (rc *Connector) CreateScope(ctx context.Context, scope string) error {
// will fall to default connector
connector, err := rc.getConnector(scope, "", "CreateScope")
if err != nil {
return base.ErrNoMoreConnector{}
return err
}
return connector.CreateScope(ctx, scope)
}
Expand All @@ -217,7 +217,7 @@ func (rc *Connector) TruncateScope(ctx context.Context, scope string) error {
// will fall to default connector
connector, err := rc.getConnector(scope, "", "TruncateScope")
if err != nil {
return base.ErrNoMoreConnector{}
return err
}
return connector.TruncateScope(ctx, scope)
}
Expand All @@ -227,7 +227,7 @@ func (rc *Connector) DropScope(ctx context.Context, scope string) error {
// will fall to default connector
connector, err := rc.getConnector(scope, "", "DropScope")
if err != nil {
return base.ErrNoMoreConnector{}
return err
}
return connector.DropScope(ctx, scope)
}
Expand All @@ -237,7 +237,7 @@ func (rc *Connector) ScopeExists(ctx context.Context, scope string) (bool, error
// will fall to default connector
connector, err := rc.getConnector(scope, "", "ScopeExists")
if err != nil {
return false, base.ErrNoMoreConnector{}
return false, err
}
return connector.ScopeExists(ctx, scope)
}
Expand Down

0 comments on commit 42c9c5c

Please sign in to comment.