Skip to content

Conversation

@debovema
Copy link
Contributor

What kind of change does this PR introduce? (check one with "x")

[] Bugfix
[x] Feature
[] Code style update (formatting, local variables)
[] Refactoring (no functional changes, no api changes)
[] Other... Please describe:

Fixes: N/A

What is the current behavior?
In TaskEvent and FlowEvent interfaces, the TaskError() and FlowError() methods return an object with interface error but it can also be an object of type activity.Error. However there is no interface to expose methods of this type.

What is the new behavior?
An interface has been added.

An example of use-case can be:

func handleErrorInSpan(span opentracing.Span, err error) {
	span.SetTag("error", true)
	span.SetTag("message", err.Error())

	switch err.(type) {
	case activity.ActivityError:
		span.SetTag("error.object", err.(activity.ActivityError).Data())
	}
}

@mellistibco mellistibco requested a review from fm-tibco October 30, 2018 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants