Skip to content

Commit

Permalink
chore: enhance transformer error with more metadata (#2742)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandumlg authored Nov 30, 2022
1 parent 5e8f73d commit e9b75e9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion processor/transformer/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,14 @@ func (trans *HandleT) request(ctx context.Context, url string, data []Transforme
},
endlessBackoff,
func(err error, t time.Duration) {
trans.logger.Errorf("JS HTTP connection error: URL: %v Error: %+v", url, err)
var transformationID, transformationVersionID string
if len(data[0].Destination.Transformations) > 0 {
transformationID = data[0].Destination.Transformations[0].ID
transformationVersionID = data[0].Destination.Transformations[0].VersionID
}
trans.logger.Errorf("JS HTTP connection error: URL: %v Error: %+v. WorkspaceID: %s, sourceID: %s, destinationID: %s, transformationID: %s, transformationVersionID: %s",
url, err, data[0].Metadata.WorkspaceID, data[0].Metadata.SourceID, data[0].Metadata.DestinationID,
transformationID, transformationVersionID)
})
// control plane back up

Expand Down

0 comments on commit e9b75e9

Please sign in to comment.